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

PHP
スポンサーリンク

最近、Laravelを使って、Facebookでソーシャルログインするテストを行っています。

LaravelのプログラムをWindowsのxamppの上で、httpsを使ってテストしていた時にエラーが出ました。

image

スポンサーリンク

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

 

image

 

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

 

うーん、原因がよくわからない。

 

ネットで調べてみるとこんな情報がありました。

laracasts

I had the exact same but on Windows & xampp. My solution was as simple as: Follow this link:http://curl.haxx.se/ca/cacert.pem Copy the entire page and save it in a: "cacert.pem"

Then in your php.ini file insert or edit the following line: curl.cainfo = "[pathtothisfile]\cacert.pem"

Problem solved

 

よくわからないので、この通り試してみることにします。

 

http://curl.haxx.se/ca/cacert.pem の中身をそのまま C:\xampp\php\cacert.pem にコピーします。

 

そして、C:\xampp\php\php.ini の最後の行に

curl.cainfo = "C:\xampp\php\cacert.pem"

を追加します。

 

この後、apacheを再起動して、先ほどと同じURLに遷移すると。。。。

 

おお、無事に動きました。

 

 

やはり、先人の知恵は偉大なり。

PHP
スポンサーリンク
スポンサーリンク
うらしたをフォローする
スポンサーリンク
urashita.com 浦下.com (ウラシタドットコム)

コメント

タイトルとURLをコピーしました