How to fix cURL error 60: SSL certificate problem

Sometimes, when we make a curl call to third party services, we get an error curl: (60) SSL certificate : unable to get local issuer certificate.

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

To fix this error, follow the steps below:

  1. Open
  2. Copy the entire page and save it as a “cacert.pem”
  3. Open your php.ini file and insert or update the following line: curl.cainfo = “[pathtofile]cacert.pem”
I hope it helps!

You may also like...