LAMP环境编译安装,其中php版本为5.6.8,php-fpm已经做成了系统服务,OS版本为CentOS6.x系列
[RuntimeException]
The Zip PHP extension is not installed. Please install it and try again.
安装php,zip模块
cd /usr/local/src
wget http://pecl.php.net/get/zip-1.12.4.tgz
tar 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-config
make && make install
安装完成后会在/usr/local/php/lib/php/extensions/下生成no-debug-non-zts-xxxxxxxx的目录,其中包含了zip.so
vim /etc/php.ini或者vim /usr/local/php/etc/php.ini
添加一行
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/zip.so
重新加载或重启fpm
service php-fpm restart
其他zip版本可查看以下连接
http://pecl.php.net/package/zip
添加curl扩展
cd /usr/local/src/php-5.6.8/ext/curl
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
echo "extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/curl.so" >>/etc/php.ini
service php-fpm restart
/usr/local/php/bin/php -m | grep curl