cURL error 60: SSL certificate problem: unable to get local issuer certificate

187次阅读
没有评论

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx5585a27807ba7xxx&secret=f3xxx227a6f3bf293f4af57b3xxxd44

原因:本地的 cURL 的SSL证书太旧了,导致不识别此证书

  1. 下载最新cURLSSL证书https://curl.se/ca/cacert.pem
  2. 把把cacert.pem拷贝到php的 ext/curl 目录下,然后编辑php.ini,打开php.ini文件
  3. 去掉curl.cainfo前面的注释“;”,然后在后面写上cacert.pem证书的完整路径及文件名。记得是绝对路径,相对路径不行,我试过了。

正文完
 0
wujingquan
版权声明:本站原创文章,由 wujingquan 于2024-12-15发表,共计457字。
转载说明:Unless otherwise specified, all articles are published by cc-4.0 protocol. Please indicate the source of reprint.
评论(没有评论)