重新编译php,添加openssl参数
1,查看openssl是否安装
# yum list openssl # yum list openssl-devel
2,获取php编译时的参数
# /usr/local/php/bin/php -i | grep Command Configure Command => './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--with-apxs2=/usr/sbin/apxs' '--with-mysql' '--enable-fpm' Server API => Command Line Interface
3,添加openssl参数
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/sbin/apxs --with-mysql --enable-fpm --with-openssl=/usr/local/ssl/
或者直接
--with-openssl
4,安装php,重启php-fpm
# make && make install # service php-fpm restart
5,检查openssl
phpinfo();
Leave a Reply