Connection to `ssl://pecl.php.net:443' failed:

1. Run the following command in putty: 

Code
php -r "print_r(openssl_get_cert_locations());"



2. It returns an array like this: 

Array 

    [default_cert_file] => /usr/local/apps/etc/openssl/cert.pem 
    [default_cert_file_env] => SSL_CERT_FILE 
    [default_cert_dir] => /usr/local/apps/etc/openssl/certs 
    [default_cert_dir_env] => SSL_CERT_DIR 
    [default_private_dir] => /usr/local/apps/etc/openssl/private 
    [default_default_cert_area] => /usr/local/apps/etc/openssl 
    [ini_cafile] => 
    [ini_capath] => 


3. Note that  /usr/local/apps/etc/openssl/cert.pem isn't present. Download a cUrl cert bundle , as suggested by this thread from Stackoverflow 

4. save the bundle in  '/usr/local/apps/etc/openssl/'  and rename it as 'cert.pem' 

Everything has been fixed. I thought it would be troublesome but turned out it was easy as pie~

转载于:https://www.cnblogs.com/gongchixin/articles/9598973.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值