Linux下php安装openSSL模块

1、找到之前php安装包,进入php-5.4.23/ext/opensll

2、#/php/bin/phpize

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

  #make

  #make install

 wKiom1fNLu_yiVqHAAAPJCPb9Wc925.png-wh_50

4、找到php.ini文件进行编辑,添加openssl.so文件;

  #vim php.ini

  extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/openssl.so

  如图所示:

  wKiom1fNL1vQ23trAAANeKyjS6Q993.png-wh_50

5、重启php-pfm进程;

  #/usr/local/php/sbin/php-fpm

6、安装时出现错误解决方法

  1)出现没有发现config.m4 ,把ext/opensll目录下的config0.m4修改成config.m4即可;

    #mv config0.m4 config.m4

  2)出现configure: error: Cannot find OpenSSL’s <evp.h>错误提示时,使用下面命令进行安装;

   #yum install openssl openssl-devel


php日志出现此错误时Unable to find the wrapper "https" - did you forget to enable it when you co,请按照上面的方法进行安装,即可解决问题;