Add a php zip module under Linux

Source: Internet
Author: User

The person who developed this morning came to me and said that the XX project on the test machine reported a mistake:

Include (ziparchive.php): Failed to open stream:no such file or directory.

said that there is no zip this module, so in the Internet to find some information to see, really do not have this module, and then download this package, installation, the results of the error, the initial Zip package version is 1.10.2, error after feeling not to strength, so the next 1.12.4 the latest version, the results were successful.

The errors of the previous 1.10.2 report are:
Make: * * * [Php_zip.lo] Error 1
ERROR: ' Make ' failed
So I changed the version and tried again, 1.12.4:

[Email protected] data]#wgethttp//pecl.php.net/get/zip-1.12.4.tgz[Email protected] data]#TarZxvfZip-1.12.4. Tgz[[email protected] data]# CDZip-1.12.4[[Email protected]Zip-1.12.4]#/usr/local/php/bin/Phpize[[email protected]Zip-1.12.4]#./configure–with-php-config=/usr/local/php/bin/php-Config[[email protected]Zip-1.12.4]# Make[[Email protected]Zip-1.12.4]# Make Install

Various versions of Zip can be downloaded to the following websites:

Http://pecl.php.net/package/zip

After the installation, modify the php.ini configuration file, plus the following extensions:

zip-1.12. 4] # vim/etc/php.iniextension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/  Zip. So

Then reload the PHP-FPM to:

[[Email protected] www]# service php-fpm reloadreload service php Done

Add a php zip module under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.