Add zip and curl extensions in PHP

Source: Internet
Author: User

Add zip and curl extensions in PHP

Compile and install the LAMP environment. The php version is 5.6.8, the php-fpm has been made into system services, and the OS version is CentOS6.x series.

[RuntimeException]                                                          The Zip PHP extension is not installed. Please install it and try again.

Install the php and zip modules

Cd/usr/local/srcwget http://pecl.php.net/get/zip-1.12.4.tgztar xvf zip-1.12.4.tgz-C/usr/local/cd/usr/local/zip-1.12.4/usr/local/php/bin/phpize. /configure -- with-php-config =/usr/local/php/bin/php-configmake & make install the no-debug-non-zts-xxxxxxxx directory is generated under/extensions, it contains the zip file. sovim/etc/php. ini or vim/usr/local/php/etc/php. ini add a line of extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/zip. so reload or restart fpmservice php-fpm restart

For other zip versions, view the following connections:
Http://pecl.php.net/package/zip

Add curl Extension

cd /usr/local/src/php-5.6.8/ext/curl/usr/local/php/bin/phpize./configure --with-php-config=/usr/local/php/bin/php-configmake && make installecho "extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/curl.so" >>/etc/php.iniservice php-fpm restart/usr/local/php/bin/php -m | grep curl

This article permanently updates the link address:

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.