“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. Although this error can be seen on any server you are more likely to see this issue on a localhost environment running on wampp/xampp.
How to fix cURL error 60: SSL certificate problem: unable to get local issuer certificate on your web server
Contact your web host to make sure that the SSL certificate is properly configured on the server. As of PHP 5.6 if the certificate is not verified you will also get a warning notice on your website.
How to fix cURL error 60: SSL certificate problem: unable to get local issuer certificate on localhost
1. Download the cacert.pem file from the official cURL website here.
2. Go the directory where you have installed xampp and put it in the ssl folder. For example,
C:\xampp\php\extras\ssl\cacert.pem
D:\program\xampp\php\extras\ssl\cacert.pem
3. Open your php.ini file and search for “curl.cainfo”.
4. Once you have found it, specify the path to the .pem file in the curl.cainfo section. For example,
curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"
The line could be commented out with a semicolon right before curl.cainfo. So make sure to uncomment it and replace ;curl.cainfo = with the line above.
5. Restart Apache so the new changes take effect on your localhost server.
That should fix the cURL error 60 issue on your web server. If you have any other suggestions for fixing this issue feel free to share it in the comments.