Curl Error 60: SSL Certificate: Unable To Get Local Issuer Certificate

This error occurs when the cURL library is unable to verify the authenticity of the SSL certificate from the remote server. To fix this issue, you can follow these steps:

  1. Download the latest bundle of CA root certificates from the cURL website. You can find the bundle in PEM format at the following URL: https://curl.haxx.se/ca/cacert.pem

  2. Save the cacert.pem file to a suitable location on your server or local development environment.

  3. In your PHP script, add the following line of code before making the cURL request:

    curl_setopt($curl, CURLOPT_CAINFO, '/path/to/cacert.pem');
    

    Replace "/path/to/cacert.pem" with the actual path to the cacert.pem file that you downloaded in step 2.

  4. Retry your cURL request, and it should now be able to verify the SSL certificate successfully.

Note: If you are on a shared hosting environment, you may need to contact your hosting provider for assistance as they may have specific instructions on how to resolve this issue.

About the Author Rex

I'm a passionate tech blogger with an insatiable love for programming! From my early days tinkering with code, I've delved into web dev, mobile apps, and AI. Sharing insights and tutorials with the world is my joy, connecting me to a global community of like-minded tech enthusiasts. Python holds a special place in my heart, but I embrace all challenges. Constantly learning, I attend tech conferences, contribute to open-source projects, and engage in code review sessions. My ultimate goal is to inspire the next generation of developers and contribute positively to the ever-evolving tech landscape. Let's code together!