Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nhatnx/7ac83423f7d4e51b713f4dfde03f38c5 to your computer and use it in GitHub Desktop.
Save nhatnx/7ac83423f7d4e51b713f4dfde03f38c5 to your computer and use it in GitHub Desktop.
[WAMP] cURL error 60: SSL certificate: unable to get local issuer certificate

Need to do this in both php.ini files !!!

Attention Wamp/Wordpress/windows users. I had this issue for hours and not even the correct answer was doing it for me, because I was editing the wrong php.ini file because the question was answered to XAMPP and not for WAMP users, even though the question was for WAMP.

here's what I did

Download the certificate bundle.

Put it inside of C:\wamp64\bin\php\your php version\extras\ssl

Make sure the file mod_ssl.so is inside of C:\wamp64\bin\apache\apache(version)\modules

Enable mod_ssl in httpd.conf inside of Apache directory C:\wamp64\bin\apache\apache2.4.27\conf

Enable php_openssl.dll in php.ini. Be aware my problem was that I had two php.ini files and I need to do this in both of them. First one can be located inside of your WAMP taskbar icon here.

php.ini file

and the other one is located in C:\wamp64\bin\php\php(Version)

find the location for both of the php.ini files and find the line curl.cainfo = and give it a path like this

curl.cainfo = "C:\wamp64\bin\php\php(Version)\extras\ssl\cacert.pem"

Now save the files and restart your server and you should be good to go

@Wiz-Amit
Copy link

Thanks 🎉

@joekhartley
Copy link

Thanks! Really useful.

@G-Basil
Copy link

G-Basil commented Aug 8, 2023

Thanks! I was searching for this.

@jesusmarioaj
Copy link

Years looking for a solution (kidding) and this works at the first attempt! Thank you!

@rizwan-yousaf
Copy link

Thank you so much! Really useful.

@AngelAlexQC
Copy link

Thanks !! Works in windows 11, I could not make calls to third party api's from an application in Yii2 and this worked perfect.
image

@skandatravels
Copy link

Thanks

@Aviatal
Copy link

Aviatal commented Mar 1, 2024

Thank you so much!

@pawelmpc
Copy link

Thank you, sir!

@techideasolutions
Copy link

Thank you, sir!

@TEisman-avanza
Copy link

Thanks a lot, you saved my day ❤️

@guille889
Copy link

thank you!

@Husnainafzal007
Copy link

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment