gpt4 book ai didi

php - SSL3_GET_SERVER_CERTIFICATE :certificate verify failed using xampp on mac

转载 作者:太空宇宙 更新时间:2023-11-03 13:35:22 25 4
gpt4 key购买 nike

希望大家一切顺利。使用 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"

但是这个方法也行不通。谁能帮我解决这个问题。谢谢

最佳答案

运行该命令并解决你的问题,我自己修复了它

curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer 

我也在使用 PHP 5.6.24 的 MacOs sierra

关于php - SSL3_GET_SERVER_CERTIFICATE :certificate verify failed using xampp on mac,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42097303/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com