I have deployed my site and its working perfectly with all functionalities. This is a e-commerce site. So for further developments I have downloaded the files from the hosting server and everything working fine. In this site I add products as below
Add a new product to the system.(working on both local machine and online site)
Then this relevant product will be assigned into a certain list which exist in the system. (working well on online site but generate below error in local server.)
Error connecting to CommissionJunction Token : [60] SSL certificate problem: unable to get local issuer certificate
System specification
- framework - Laravel 5.3
- Local machine os - Windows 10
- Local machine web serve - WAMP
- php version - 7.1.9
As I said before this function is working perfectly online. But it generate mentioned error in local machine
I have googled this and unable to find any solution.
Also navigated through below stackoverflow questions already
- curl: (60) SSL certificate : unable to get local issuer certificate
- PayPal IPN: unable to get local issuer certificate
- SSL errors using MailChimp's API
- How do you add a certificate authority (CA) to Ubuntu?
Also went through this too cURL on Windows
Laravel shows that error occoured in this line . But I think that there is no coding error.
$body = curl_exec($ch);
$errno = curl_errno($ch);
if ($errno !== 0) {
throw new Exception(sprintf("Error connecting to CommissionJunction Token : [%s] %s", $errno, curl_error($ch)), $errno);
}
After going through all these still no luck . So any help on this will be warmly welcomed. Thanks.
Update 01
Acorrding to the comments I have changed below changes
- Downloaded the latest certificate bundle via CA certificates extracted from Mozilla
- Then certificate bundle moved to
c:\wamp64\
- Enabled
mod_ssl
in Apache as below (I'm not sure ether this method is OK or not) - Clicked on the WAMP icon -> Apache 2.4.27 -> Apache modules -> then select the ssl_module
- Enabled the
php_openssl.dll
inphp.ini
by removing;
- Added below codes to
php.ini
curl.cainfo="C:/wamp64/cacert.pem"
openssl.cafile="C:/wamp64/cacert.pem"
- Restarted the serve