php在curl的時候報此錯誤:
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
根據報錯後面提示的地址查詢60錯誤:
CURLE_SSL_CACERT (60)
Peer certificate cannot be authenticated with known CA certificates.
無法獲取本地頒發者證書
關於“SSL證書問題:無法獲取本地頒發者證書”錯誤。顯然,這適用於發送CURL請求的系統(並且沒有接收請求的服務器)
1)從 https://curl.haxx.se/ca/cacert.pem 下載最新的cacert.pem
2)將以下行添加到php.ini(如果這是共享託管和您沒有訪問php.ini然後你可以添加到.user.ini在public_html)
curl.cainfo=/path/to/downloaded/cacert.pem
3)默認情況下,FastCGI進程將每隔300秒解析新文件(如果需要,您可以通過添加幾個文件來更改頻率,如這裏建議的https://ss88.uk/blog/fast-cgi-and-user-ini -files-the-new-htaccess /)