Troubleshooting "HTTPS and SSL3_GET_SERVER_CERTIFICATE:certificate verify failed, CA is OK" Error
On XAMPP, users may encounter the error "cURL resource: SSL certificate problem, verify that the CA cert is OK" when attempting to access HTTPS-enabled sites after upgrading to version 1.7.3.
Verifying CA Certificate
Despite suggestions to use specific cURL options, the problem likely stems from a change in PHP installation or Apache settings. To resolve the issue, follow these steps:
Windows Solution:
For PHP Versions Older Than 5.3.7:
For each cURL resource, set the CURLOPT_CAINFO option to the path of the cacert.pem file using the following syntax:
curl_setopt ($ch, CURLOPT_CAINFO, "PATH_TO/cacert.pem");
By verifying the CA certificate and setting the appropriate curl.cainfo option, you can resolve this error and restore proper HTTPS functionality.
The above is the detailed content of How to Fix the 'HTTPS and SSL3_GET_SERVER_CERTIFICATE: certificate verify failed, CA is OK' Error in XAMPP?. For more information, please follow other related articles on the PHP Chinese website!