How To Fix cURL Error 60 SSL Certificate Problem

Websolutionstuff | Dec-08-2021 | Categories : Laravel PHP

In this example we see how to fix cURL error 60 SSL certificate problem. cURL error 60: SSL certificate problem: unable to get local issuer certificate error occurs when we try to call the API with the secure https:// protocol in the request URL.

cURL error 60 SSL certificate problem on localhost in xampp and localhost wampp server. Also you can face curl 60 ssl certificate problem on windows, In laravel guzzle ssl certificate issue.

 

Why cURL Error 60 SSL certificate Occurs?

Your API call try to run request URL with only http:// protocol. You can’t see the error anymore because secure API calls require an SSL certificate or https:// protocol.

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

 

 

How To Fix cURL Error 60 SSL Certificate Problem ?

1. Open http://curl.haxx.se/ca/cacert.pem or Download the “cacert.pem” free certificate file from the official website http://curl.haxx.se/docs/caextract.html

2. Save it as a “cacert.pem”.

3. Paste cacert.pem in WAMP user to C:\wamp64\bin\php\cacert.pem, for XAMPP user to C:\xampp\php\extras\ssl\cacert.pem path.

4. Open php.ini and find this line

;curl.cainfo

5. Now, we need to add the path of the certificate to “curl.cainfo” and remove semicolon(;) as follow.

curl.cainfo = "C:\wamp64\bin\php\cacert.pem"

6. The most important step is to save and close your php.iniRestart your WAMP or XAMPP server and try your request again. If you do not set the right path, then you will experience a cURL 77 error.

 


You might also like :

Recommended Post
Featured Post
How to Validate Empty Input Field in jQuery
How to Validate Empty Input Fi...

In the dynamic world of web development, form validation is a crucial aspect of creating a user-friendly and error-free...

Read More

Sep-25-2023

How To File Upload With Progress Bar In PHP
How To File Upload With Progre...

In this article, we will see how to file upload with a progress bar in PHP using ajax jquery. The file upload...

Read More

Sep-21-2022

How To Generate QR Code In Angular 13
How To Generate QR Code In Ang...

In this article, we will see how to generate QR code in angular 13. In this example, we will use the angularx-qrcod...

Read More

Jun-09-2022

How To Image Upload Using Ajax In Laravel 9
How To Image Upload Using Ajax...

In this article, we will see how to image upload using ajax in laravel 9. Here, we will learn about image upload in...

Read More

Feb-07-2023