PHP 7.0 - ZipArchive Library is missing or disabled

Posted February 24, 2016 356k views

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

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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 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-*

After doing

sudo apt-get install php7.0-zip

don’t forget to restart Apache

sudo service apache2 restart

Hello Dear Friends,
I am having the same issue, have installed php7.0 zip as mentioned. Added 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