我在 Windows 计算机上使用本机 PHP 5.6 时遇到问题。当我尝试运行 Composer 更新(php Composer.phar update)时出现此错误:
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
openssl 扩展已加载。我已经下载了这个文件http://curl.haxx.se/ca/cacert.pem
并将其保存到我机器上的路径中,并在 php.ini 中设置此路径,例如
openssl.cafile = "c:\path\to\cacert.pem"
但没有成功,还是同样的错误。
好的,问题解决了:我必须从系统变量中删除 https-proxy。不知道为什么,但它有效......
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)