2a7da21e0db2c5fe1363a984aa802de3c4a02242
By:
sugarhill

PHP 7.0 - ZipArchive Library is missing or disabled

February 24, 2016 32.9k views
PHP LEMP Nginx Ubuntu

After setting up a new 512mb web server droplet using:
Ubuntu 14.04 // NGINX // PHP7.0 // MariaDB // Wordpress

I get the following error message using my backup app:

PHP ZipArchive Library is missing or disabled

I never encountered this error before on my other droplets with identical configs so I guess this is a recent change in some package. Strangely plugin via wordpress backend unzip/install works fine.

Does anyone know how to enable this feature with php7.0?


Here are the relevant entries from my php-info file:
PHP Version 7.0.3-8+deb.sury.org~trusty+2

Additional .ini files parsed        /etc/php/7.0/fpm/conf.d/20-zlib.ini
Registered PHP Streams  compress.zlib, phar
Registered Stream Filters       zlib.*

ZLib Support    enabled
Stream Wrapper  compress.zlib://
Stream Filter   zlib.inflate, zlib.deflate
Compiled Version    1.2.8
Linked Version  1.2.8
zlib.output_compression Off Off
zlib.output_compression_level   -1  -1
zlib.output_handler no value    no value

I know it says zlib.output_compression Off Off
but I have the same setting on another droplet and there it works
the only difference on my other droplets is that PHP7 was installed as an upgrade to PHP5 while on my faulty droplet PHP7 was installed not as an update

2 Answers

When upgrading to PHP 7, you should make sure to install the PHP 7 versions of you libraries as well. The PPA providing PHP 7 also provides a php7.0-zip package. You can install it with:

  • sudo apt-get install php7.0-zip

To see additional PHP 7 libraries that are available, run:

  • sudo apt-cache search php7.0-*

Hello Dear Friends,
I am having the same issue, have installed php7.0 zip as mentioned. Added extension=zip.so in the php.ini file and still having the following error:

*importing slider setings and data...
no custom animations found, if slider uses custom animations, the provided export may be broken...
dynamic styles imported!
Error: Wrong export slider file format! This could be caused because the ZipArchive extension is not enabled.

Your help will be highly appreciated.

UPDATE: I have read that I need to recompile php with --zip extension enabled. I do not know how to do it. And I am worried that I might lose my config in php.ini. I will lose it right ? so I need to back up ? Would it affect any other configuration ?

UPDATE 2: zip looks like enabled in info.php

Have another answer? Share your knowledge.