【发布时间】:2017-06-25 03:17:33
【问题描述】:
希望每个人都做得很好。使用 laravel 创建新项目时出现 SSL 错误。这是我的错误:
[Composer\Downloader\TransportException]
The "http://packagist.org/p/laravel/laravel$745fa4e5f0a1485878f0b4c5be5cf26
a9e5d68243751f3c34acbd8bf3766065d.json" file could not be downloaded: SSL o
peration failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
Failed to enable crypto
failed to open stream: operation failed
对于这个问题,我正在尝试多种解决方案,但结果仍然为零。我想分享一种用于 SSL 问题的方法。我在某个网站上得到了下面的方法,在 php.ini 文件中添加下面代码的人指南在哪里。
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo ="/Applications/XAMPP/xamppfiles/etc/cacert.pem"
[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile="/Applications/XAMPP/xamppfiles/etc/cacert.pem"
但是这种方法也行不通。谁能帮我解决这个问题。谢谢
【问题讨论】: