1. 程式人生 > >easywechat 微信開發上傳素材時 PHP出現 cURL error 60 的解決辦法

easywechat 微信開發上傳素材時 PHP出現 cURL error 60 的解決辦法

Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate

cURL error 60: SSL certificate: unable to get local issuer certificate."看提示應該是證書出現了問題.

無法使用已知的CA證書對對等證書進行身份驗證。

解決方法

1 設定一個正確的證書。

本地ssl判別證書太舊,導致連結報錯ssl證書不正確。

我們需要

下載新的ssl 本地判別檔案

http://curl.haxx.se/ca/cacert.pem    下載最新的cacert.pem

然後放在【:path\to\php\extras\ssl\cacert.pem】也就是php路徑下的【extras\ssl\】資料夾裡面。


然後開啟【php.ini】檔案,找到最後面的【curl.cainfo = 】修改為【curl.cainfo ="E:\xampp\php\extras\ssl\cacert.pem"】,儲存即可。  

注意一定要開啟openssl 

windows下php開啟openssl



1.首先檢視是否存在php_openssl.dll擴充套件

安裝目錄如下E:\xampp\php\ext\php_openssl.dll

2.擴充套件目錄下存在php_openssl.dll擴充套件

開啟php.ini配置檔案

搜尋extension=php_openssl.dll


去掉註釋即可

3.擴充套件目錄下不存在php_openssl.dll擴充套件

找到php_openssl.dll擴充套件檔案

在進行步驟2即可

重啟 apache伺服器