Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install php-zip on php 5.6 on Ubuntu [duplicate]

Tags:

php

zip

I can't install php-zip on my Ubuntu VM with the last php5.6.

Can't find find anything clear on it.

I still get that Apache error :

PHP Fatal error:  Class 'ZipArchive' not found in /var/www/uta/system/library/PHPExcel/PHPExcel/Writer/... 

Thanks

like image 515
SoCkEt7 Avatar asked Jun 29 '16 15:06

SoCkEt7


People also ask

How do I fix PHP zip extension is not loaded?

This error indicates an incompatibility with PHP on your server and the latest update to Elementor. To solve it, please ensure the PHP version is 7.4 or 7.5 (not 7.3 or 8) on your server. Additionally, ensure the zip extension for PHP is installed.


1 Answers

Try either

  • sudo apt-get install php-zip or
  • sudo apt-get install php5.6-zip

Then, you might have to restart your web server.

  • sudo service apache2 restart or
  • sudo service nginx restart

If you are installing on centos or fedora OS then use yum in place of apt-get. example:-

sudo yum install php-zip or sudo yum install php5.6-zip and sudo service httpd restart

like image 164
Gareth Parker Avatar answered Sep 24 '22 15:09

Gareth Parker