Often, 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. In this article, we will discuss why does this error occur? how to resolve: unable to get local issuer certificate error occurs? Let’s jump into it.
Table of Contents |
1. Why This Error Occurs? |
2. How To Resolve: cURL error 60? |
Why Does This Error Occur?
Just go to your API call code and try to run the request URL with only http:// protocol. You can’t see the error anymore because secure API calls require an SSL certificate.
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.
It has a very very simple solution. We just need to download the certificate and set the path. Are you ready? Then let’s set up an SSL certificate step by step as below:
How To Resolve: unable to get local issuer certificate error?
- Download the “cacert.pem” free certificate file from the official website here: http://curl.haxx.se/docs/caextract.html
- Move the cacert.pem file in a reachable destination for the PHP. It is advisable to move the file for the WAMP user to
C:\wamp64\bin\php\cacert.pem
, for XAMPP user to C:\xampp\php\extras\ssl\cacert.pem, for the AMPPS user toC:\Program Files (x86)\Ampps\php\extras\ssl\cacert.pem
- Now, open your php.ini file and find the “curl.cainfo” option. You will see something like the following:
; curl.cainfo =
- After that, 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"
- The very very most important step is to save and close your php.ini. Restart your web server and try your request again. If you do not set the right path, then you will experience a CURL 77 error.
Hurray! we have completed all steps to solve unable to get local issuer certificate error.
Additionally, read our guide:
- Specified Key Was Too Long Error In Laravel
- Run PHP Artisan Commands On Shared Hosting Servers
- How To Calculate Age From Birthdate
- Active Directory Using LDAP in PHP or Laravel
- How To Use The Laravel Soft Delete
- How To Add Laravel Next Prev Pagination
- Best Way to Remove Public from URL in Laravel
- Difference Between Factory And Seeders In Laravel
- Difference Between Events and Observers In Laravel
- Session Not Working In Laravel
- How To Install Vue In Laravel 8 Step By Step
- How To Handle Failed Jobs In Laravel
- Best Ways To Define Global Variable In Laravel
- How To Get Latest Records In Laravel
- Laravel Twilio Send SMS Tutorial With Example
- How To Pass Laravel URL Parameter
- Laravel 9 Resource Controller And Route With Example
- Laravel 9 File Upload Tutorial With Example
- How To Schedule Tasks In Laravel With Example
- Laravel Collection Push() And Put() With Example
That’s it from our end. We hope this article helped you to resolve cURL error 60: SSL certificate problem: unable to get local issuer certificate error.
Please let us know in the comments if everything worked as expected, your issues, or any questions. If you think this article saved your time & money, please do comment, share, like & subscribe. Thank you for reading this post. 🙂 Keep Smiling! Happy Coding!
Nice ansᴡer back in гeturn of this question witһ firm arguments
ɑnd describing everything on the topic of that.
Thank you 🙂
Followed this step by step however seems to not work anyway. I’m at a loss, with the same ssl certificate error.