Home > Backend Development > PHP Tutorial > 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?

Patricia Arquette
Release: 2024-12-09 19:26:11
Original
157 people have browsed it

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");
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template