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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Heya,
The error message “PHP ZipArchive Library is missing or disabled” means that the PHP ZipArchive extension, which is required by your backup application, is not installed or enabled on your server.
To install and enable this extension, you can run the following command:
After running this command, you will need to restart your PHP service (which in your case appears to be php-fpm) for the changes to take effect:
If the ZipArchive extension is already installed but just disabled, you can enable it by modifying your
php.ini
file. You can locate this file using the command:Once you’ve located the
php.ini
file, open it using a text editor, find the line that looks like;extension=zip.so
, uncomment it by removing the semicolon (;
), then save and exit. Finally, restart the PHP service as described above.If you don’t see a line like
;extension=zip.so
, then it’s likely that the extension isn’t installed, and you should run theapt-get install
command as shown above.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:To see additional PHP 7 libraries that are available, run:
After doing
sudo apt-get install php7.0-zip
don’t forget to restart Apache
sudo service apache2 restart