且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

cURL 错误 60:Laravel 5.4 中的 SSL 证书

更新时间:2023-02-24 15:29:20

不要修改 vendor/ 文件夹中的文件.曾经.它们可以并且将在您运行的下一次 Composer 更新时被覆盖.

Do not ever modify files in the vendor/ folder. Ever. They can and will be overwritten on the next composer update you run.

这是我的 WampServer 解决方案

我的 WampServer 使用的是 PHP 7.1.9,因此将下面示例中的 7.1.9 更改为您当前使用的版本号.

I am using PHP 7.1.9 for my WampServer, so change 7.1.9 in the example below to the version number you are currently using.

  1. 下载此文件:http://curl.haxx.se/ca/cacert.pem
  2. 将此文件放在C:wamp64inphpphp7.1.9文件夹
  3. 打开 php.ini 并找到这一行:
  1. Download this file: http://curl.haxx.se/ca/cacert.pem
  2. Place this file in the C:wamp64inphpphp7.1.9 folder
  3. Open php.iniand find this line:

;curl.cainfo

改为:

curl.cainfo = "C:wamp64inphpphp7.1.9cacert.pem"

确保删除行首的分号.

保存对 php.ini 的更改,重新启动 WampServer,您就可以开始了!

Save changes to php.ini, restart WampServer, and you're good to go!