0
user-people-family-house-home

【Laravel】SSL certificate problem: unable to get local certificate issuer

Error SSL certificate problem: unable to get local certifica...

Posted by Roy on 2022-06-14 16:58:52 Views

Error SSL certificate problem: unable to get local certificate issuer

 

在Laravel實作Line Bot SDK的推播測試上遇到

SSL certificate problem: unable to get local certificate issuer

也就是curl出去時因為憑證認證失敗導致的問題

解決方法

方案一

下載 cacert.pem

# php.ini
curl.cainfo="{{pem_path}}"
openssl.cafile="{{pem_path}}"

方案二


curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);

View Comments