php5.6.11 openssl安装

今天开发说php不能发邮件,一看发现没有openssl,想在编译php时就把openssl编译进去加--enable-ssl,如果没有安装的话,那么就按照下面的步骤添加openssl模块

cd /wdzj/source/php-5.6.11/ext/openssl

#/wdzj/lnmp/php5.6.11/bin/phpize
Cannot find config.m4.
Make sure that you run '/wdzj/lnmp/php5.6.11/bin/phpize' in the top level source directory of the module

cp config0.m4 config.m4

yum -y install autoconf

/wdzj/lnmp/php5.6.11/bin/phpize 

./configure --with-openssl --with-php-config=/wdzj/lnmp/php5.6.11/bin/php-config

make; make install

vi /wdzj/lnmp/php5.6.11/lib/php.ini

extension = openssl.so

 

发送邮件报下面的错误

[Composer\Downloader\TransportException]
  The "http://packages.zendframework.com/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
  Failed to enable crypto
解决办法下:
cd /wdzj/lnmp/php/php/extensions/no-debug-non-zts-20131226/
curl http://curl.haxx.se/ca/cacert.pem -o cacert.pem
然后修改php.ini文件
openssl.cafile=/wdzj/lnmp/php/php/extensions/no-debug-non-zts-20131226/cacert.pem

重启php-fpm






 

 

  

 

posted @ 2015-08-18 14:47  xiaohui163  阅读(2597)  评论(0编辑  收藏  举报