How To Fix cURL Error 60 SSL Certificate Problem

In this article, we see how to fix the cURL error 60 SSL certificate problem. cURL error 60: SSL certificate problem: unable to get local issuer certificate error occurs when we try to call the API with the secure https:// protocol in the request URL.

cURL error 60 SSL certificate problem on localhost in xampp and localhost wamp server. Also, you can face a curl 60 SSL certificate problem on windows, In the laravel guzzle SSL certificate issue.

Why does cURL Error 60 SSL certificate Occur?

Your API call tries to run the request URL with only http:// protocol. You can’t see the error anymore because secure API calls require an SSL certificate or https:// protocol.

This error occurs because the API call makes a secure connection request using the self-signed certificate. When it does not find a valid certificate, it throws an error.



How To Fix cURL Error 60 SSL Certificate Problem?

1. Open or Download the “cacert.pem” free certificate file from the official website

2. Save it as a “cacert.pem”.

3. Paste cacert.pem in WAMP user to C:\wamp64\bin\php\cacert.pem, for XAMPP user to C:\xampp\php\extras\ssl\cacert.pem path.

4. Open php.ini and find this line


5. Now, we need to add the path of the certificate to “curl.cainfo” and remove the semicolon(;) as follows.

curl.cainfo = "C:\wamp64\bin\php\cacert.pem"

6. The most important step is to save and close your php.iniRestart your WAMP or XAMPP server and try your request again. If you do not set the right path, then you will experience a cURL 77 error.


You might also like: