Curl Error 60 SSL Certificate Problem Wamp Xampp

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

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of 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 from a starting stage. As well as demo example.

Leave a Reply

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