您的位置:首页 > 运维架构 > Linux

linux 不重新编译PHP 增加扩展

2014-09-16 15:48 549 查看
**举例增加openssl扩展**

#下面是php的安装目录

/usr/local/php5/bin/

#切换到php安装目录的 etx/openssl目录

cd /php-5.3.8p/ext/openssl

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

cp config0.m4 config.m4

#依次执行:

/usr/local/php5/bin/phpize

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

make && make install

#然后找到php.ini所在位置 打开 extension_dir(如果没有则自行添加), 同时添加 extension = "openssl.so"

#重启服务器 即可

#openssl 查看方法:

/usr/local/php5/bin/php -i |grep openssl
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: