cURL Error 60: SSL Certificate Problem
When sending API requests using Stripe, you may encounter the error "cURL error 60: SSL certificate problem: unable to get local issuer certificate." This issue arises due to difficulty verifying the SSL certificate during communication.
Resolution:
Download and Extract cacert.pem:
Save the File:
Update php.ini:
Add or update the following line:
curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"
Restart Services:
Additional Option:
If the previous steps do not resolve the issue, you can try the following:
In your code, where you perform the cURL request, add the following options:
curl_setopt($process, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); curl_setopt($process, CURLOPT_SSL_VERIFYPEER, true);
These steps will typically resolve the cURL error 60 by providing your PHP server with the necessary SSL certificates to verify the remote server's identity.
The above is the detailed content of How to Fix cURL Error 60: SSL Certificate Problem with Stripe API Requests?. For more information, please follow other related articles on the PHP Chinese website!