(Class 'ziparchive 'not found) linux apache adds the zip module and ziparchiveapache
When the website is exported to phpexcel on the linux platform, the error "Class 'ziparchive 'not found" is displayed.
Cause: php does not have the zip module installed.
Solution: Install the zip module.
Solution Process:
Get zip package
wget http://pecl.php.net/get/zip
Decompress the zip package and enter
tar -zxvf zipcd zip-1.x.x
This is a command.
Yum install php-develAnd then run phpize.
phpize
In this case, you need to obtain the php-config location of the local machine. The method is also very simple.
Phpinfo ()The function can obtain the php installation information.
Find/-name php-config
You may find several, but find the corresponding directory based on your own installation, and then compile and install it easily. NOTE: If configure is not added with parameters, an error will occur. After you execute make insatall, you will get a path containing the generated zip. so.
./configure --with-php-config=/usr/local/php5/bin/php/php-config
Compile (I use the root permission, but not the root permission. Please switch)
make
Installation (I use the root permission, but not the root permission. Note the switch)
make instal
You can find the location of your php. ini file through
Find/-name php. iniYou can also use
Phpinfo ();Obtain the location of php. ini.
Make three modifications to direct the extension_dir directory to the directory generated by your file. Note that if this is already done, we recommend that you copy zip. so to the specified directory and set extension = zip. so.
extension_dir = /usr/local/lib/php/extensions/extension=zip.so
Set the following parameters. You can first find the parameter to see if it has been enabled, and then set the value to On
zlib.output_compression = On
Now that the configuration is complete, run the command to restart apache.
service apache2 restart
Then, you can write <? Php echo phpinfo ();
?> Access this file, view the current configuration information, and check whether the zip module has been installed successfully. The entire installation process is like this. The most error-prone part is make) so be sure to configure the parameters when you execute configure. So far, the zip module in your php has been installed successfully. Check whether the following excel export problems exist.
PHP: Class 'ziparchive 'not found in
Remove the semicolon before extension = php_zip.dll in php. ini. The premise is that you have installed php_zip.dll In the ext folder in php.
Linux, Class 'mysqli' not found
Www.cnblogs.com/..4.html