php 动态添加OPENSSL模块

1.先查看PHP的版本,去http://us2.php.net/releases/下载对应版本源代码

 作者这里是wget http://museum.php.net/php5/php-5.2.10.tar.gz

tar -zxvf php-5.2.10.tar.gz

cd php-5.2.10

cd ext/openssl

/usr/local/php/bin/phpize

Cannot find config.m4.
Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

查看openssl目录下有个config.w32和config0.m4,把config0.m4改名为config.m4。
mv config0.m4 config.m4

/usr/local/php/bin/phpize

./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config

make;make install

就OK了,然后cd PHP的extensions 目录 就有openssl.so了。。。


提示成功后,在php.ini里加入extension = openssl.so
重启apache或php-fpm,完成.

posted on 2012-08-08 17:20  cn三少<script></script>  阅读(298)  评论(0编辑  收藏  举报

导航