解决PHP报错——cURL error 60: SSL certificate: unable to get local issuer certificate

使用Composer部署开发环境时,遇到错误,提示代码如下:

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
大致

解决方案

从提示信息可以了解到,大概就是无法验证远程站点证书,需要更新载入即可。

  • 下载地址:cacert.pem
  • 修改php.ini文件,curl.cainfo = "C:\Windows\cacert.pem" (这个就是下载后的cacert.pem文件路径,可随意更改)
  • 重启你的Nginx/PHP环境
CURLE_PEER_FAILED_VERIFICATION (60)

The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.

资料来源:cURL error 60: SSL certificate: unable to get local issuer certificate

最后修改:2019 年 09 月 30 日 08 : 41 PM

发表评论