Quantcast
Channel: linux运维小站–linux系统架构_服务器运维_Linux运维工程师工作手札
Viewing all articles
Browse latest Browse all 130

centos下php添加openssl扩展

$
0
0

环境:Centos 5.6   php 5.3.x

php路径:/usr/local/webserver/php

php源文件路径:/data/soft/php5.3.x

因移动支付申请支付宝接口,需要添加openssl扩展来支持接口文件

安装过程

#进入php openssl扩展目录
cd /data/soft/php5.3.x/ext/openssl

/usr/local/webserver/php/bin/phpize
./configure  –with-openssl –with-php-config=/usr/local/webserver/php/bin/php-config
make
make install

编辑php.ini文件,找到extension_dir,在其下方添加extension = “openssl.so”

重启php kill -SIGUSR2 `cat /usr/local/webserver/php/logs/php-fpm.pid`

最后检查扩展是否安装成功

/usr/local/webserver/php/bin/php -i |grep openssl


Viewing all articles
Browse latest Browse all 130

Trending Articles