Fix XAMPP cURL error 60: SSL certificate: unable to get local issuer certificate

Sep 28, 2017 by M. Zemmy Indrapatih

The issue shown in page title already happen for several times for me especially after reinstall my OS. I forgot to write down the step to fix this issue. So this blog will reminds me how to do it step by step for later use.

This issue likely only happen if you try to use SSL virtual host on XAMPP. So to fix this issue, there are 4 steps you should follow:
1. Download cacert.pem.
You can download cacert.pem from official curl creator website:
cacert.pem may not changed on file. So on the next step below, if after the last step the curl still error, you may download cacert.pem from alternatif place:
The site will give you zip file, please extract the cacert.pem from it.

2. Put the cacert.pem inside PHP folder in your XAMPP install directory.
Assume on Windows and your installed XAMPP is on drive C:\, you will have to put cacert.pem here: C:\xampp\php\extras\ssl\cacert.pem

3. Update your XAMPP php.ini.
Find your XAMPP php.ini, assume on Windows and your installed XAMPP is on drive C:\, the php.ini location should be: c:\xampp\php\php.ini. Edit the file and then update the section below to put the path to cacert.pem above.

; php.ini Options  ;

curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"

4. Restart your XAMPP webserver/apache.
Open XAMPP Control Panel, then restart apache service.

Hope this guide will help you to solve this issue.