linux php安装openssl和curl等插件支持

来源:互联网 发布:2016茶叶种类消费数据 编辑:程序博客网 时间:2024/05/21 22:40
1. 安装openssl
解压php的源码包
tar zxvf php-5.3.8.tar.gz 
cd soft/php-5.3.8/ext/openssl
 mv config0.m4 config.m4                            否则报错:找不到config.m4
/opt/local/php-5.3.8/bin/phpize 
./configure --with-openssl --with-php-config=/opt/local/php-5.3.8/bin/php-config 
make
make test
make install

编辑php.ini文件增加下面的内容

[openssl]
        extension_dir="/opt/local/php-5.3.8/lib/php/extensions/no-debug-non-zts-20090626/"
        extension="openssl.so"

2.安装curl 扩展
cd soft/php-5.3.8/ext/curl
 /opt/local/php-5.3.8/bin/phpize 
./configure --with-curl  --with-php-config=/opt/local/php-5.3.8/bin/php-config
make
make test
make install

编辑php.ini文件增加下面的内容

[curl]
        extension_dir="/opt/local/php-5.3.8/lib/php/extensions/no-debug-non-zts-20090626/"
        extension="curl.so"
0 0