Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP cURL error code 60

Tags:

php

curl

Whilst trying to setup a php environment on windows (using wamp) to use the Amazon PHP SDK, when i try to run a sample test I get the following error:

Fatal error: Uncaught exception 'cURL_Exception' with message 'cURL resource: Resource id #10; cURL error: SSL certificate problem: unable to get local issuer certificate (cURL error code 60). See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of error codes.' in C:\wamp\www\AWSSDKforPHP\lib\requestcore\requestcore.class.php on line 848 

I have already added the following line to my php.ini

curl.cainfo = C:\Windows\ca-bundle.crt 

which is the location of a certificate i created using this VBS script VBS-Script

I have restarted my WAMP service also.

PHP index curl reference

like image 860
Ciaran Avatar asked Jan 14 '14 13:01

Ciaran


People also ask

What is a cURL Error 60?

“cURL error 60: SSL certificate problem: unable to get local issuer certificate” is a common error that occurs when your website tries to communicate with an external API via HTTPS and the SSL certificate on the server is not verified or properly configured.


1 Answers

Use this certificate root certificate bundle:

https://curl.haxx.se/ca/cacert.pem

Copy this certificate bundle on your disk. And use this on php.ini

curl.cainfo = "path_to_cert\cacert.pem" 
like image 79
Hüseyin BABAL Avatar answered Sep 23 '22 02:09

Hüseyin BABAL