Curl Error 60 SSL Certificate Problem Wamp Xampp

When you face “cURL Error 60: SSL Certificate Problem unable to get local issuer certificate or certificate has expired” in Wamp or XAMPP Server, it means that cURL is having trouble verifying the SSL certificate of the remote server or you are trying to call API. This error usually occurs because cURL does not have access to the proper Certificate Authority (CA) certificates or the certificates are out of date.

In this tutorial, you will find the solution easy solution to resolve curl error 60 ssl certificate problem unable to get local issuer certificate or certificate has expired wamp or xampp server.

How to Fix Curl Error 60 SSL Certificate Problem Wamp Xampp

To fix curl error 60 ssl unable to get local issuer certificate or certificate has expired problem wamp or xampp server issue, you can follow these steps:

  • Step 1: Download the CA Certificates
  • Step 2: Configure PHP to Use the CA Certificates
  • Step 3: Restart Your Wamp or XAMPP Server
  • Step 4: Test cURL

Step 1: Download the CA Certificates

First of all, visit cURL website and download the latest CA certificates bundle (cacert.pem).

Save the downloaded cacert.pem file to a location on your computer, such as C:\cacert.pem or any other directory you prefer.

Step 2: Configure PHP to Use the CA Certificates

Next, you need to configure PHP to use the downloaded CA certificates bundle.

Now, you need to visit Wamp or XAMPP installation folder and find php.ini file.

The php.ini file path can vary depending on your setup, but it’s often located in a folder like C:\wamp64\bin\php\php7.4.32 for Wamp or C:\xampp\php for XAMPP.

Open php.ini in any text editor. And search for the following line in php.ini:

;curl.cainfo =

Then uncomment the line by removing the semicolon (;) at the beginning and set the path to the cacert.pem file you downloaded earlier. For example:

curl.cainfo = "C:\cacert.pem"

Make sure to replace "C:\cacert.pem" with the actual path to the cacert.pem file on your system. Save the php.ini file and close it.

Step 3: Restart Your Wamp or XAMPP Server

Once you have made changes in php.ini, Then restart your Wamp or XAMPP server for the changes to take effect.

Step 4: Test cURL

Now you can check that the curl is working without SSL certificate errors.

Conclusion

That’s it; you have learned how to fix the cURL error 60: SSL certificate problem in your Wamp or XAMPP environment server.

Recommended Tutorials

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *