本文介绍了梨通道更新 pear.php.net 后的 SSL 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows7 上有 XAMPP.更新 pear.php.net 频道后:

I have XAMPP on Windows7. after update the pear.php.net channel with:

pear channel-update pear.php.net

并尝试安装新包,例如 pecl install zmq ,遇到以下消息并且无法安装任何包:

and try for installing new packages, for example pecl install zmq , encountered with following message and can not install any package:

Connection to 'ssl://pecl.php.net:443' failed: Unable to find the socket
transport "ssl" - did you forget to enable it when you configured PHP?

我在网上非常搜索并试图解决它但无法解决它.谁能帮我解决这个问题,原因是什么?

I very searched in net and tried to solve it but cannot resolve it. can anyone help me for resolve that and what is the reason?

推荐答案

最近我在使用 XAMPP 7.0 的 macOS Sierra 上遇到了这个问题

recently I faced this issue with macOS Sierra with XAMPP 7.0

我更新了 pecl 频道

I updated pecl channel wiht

sudo pecl channel-update pecl.php.net

然后我得到了

连接到 `ssl://pecl.php.net:443' 失败:

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

我的解决方法如下

运行 php -r "print_r(openssl_get_cert_locations());"

检查default_cert_file路径

然后从 http://curl.haxx.se/ca/cacert.pem 下载证书重命名并将其放在 default_cert_file 路径

then download certificate from http://curl.haxx.se/ca/cacert.pemrename it and place it at default_cert_file path

然后试试pecl 列出所有

then trypecl list-all

应该可以正常使用

这篇关于梨通道更新 pear.php.net 后的 SSL 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

查看更多