Tag Archives: Class ‘ZipArchive’ not found

[Solved] An error class’ ZipArchive ‘not found is reported after testing phpexcel

Generate excel, run the test locally and get the error Class ‘ZipArchive’ not found.

Solution:

In the window system:

In the php.ini file, remove the semicolon “;” in front of extension=php_zip.dll, change zlib.output_compression = Off to zlib.output_compression = On, and restart apache

2. Under linux system:

To recompile php_zip.dll

1 cd /usr/src 2 wget http://pecl.php.net/get/zip 3 tar -zxvf zip 4 cd zip-1.x.x 5 phpize 6 . /configure 7 make 8 sudo make instal

After installation, record the location of zip.so on the screen, e.g. /usr/local/lib/php/extensions/zip.so

In php.ini, add extension = /usr/local/lib/php/extensions/zip.so, then change zlib.output_compression = Off to zlib.output_compression = On

Finally restart apache: service httpd restart