"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How to Fix the "HTTPS and SSL3_GET_SERVER_CERTIFICATE: certificate verify failed, CA is OK" Error in XAMPP?

How to Fix the "HTTPS and SSL3_GET_SERVER_CERTIFICATE: certificate verify failed, CA is OK" Error in XAMPP?

Posted on 2025-02-07
Browse:473

How to Fix the

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:

  1. Download cacert.pem from https://curl.se/ca/cacert.pem and save it in a convenient location.
  2. Update php.ini by adding the line curl.cainfo = "PATH_TO/cacert.pem".

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.

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3