Home  >  Article  >  Backend Development  >  How to Resolve PHP cURL Error Code 60: SSL Certificate Issues on Windows?

How to Resolve PHP cURL Error Code 60: SSL Certificate Issues on Windows?

Patricia Arquette
Patricia ArquetteOriginal
2024-10-26 11:13:02271browse

How to Resolve PHP cURL Error Code 60: SSL Certificate Issues on Windows?

PHP cURL Error Code 60: Troubleshooting SSL Certificate Issues

When setting up a PHP environment on Windows using WAMP and integrating the Amazon PHP SDK, you may encounter error code 60 in cURL. This error indicates an SSL certificate problem, specifically an inability to obtain the local issuer certificate.

To resolve this issue, verify that the following settings in your php.ini file are correct:

curl.cainfo = C:\Windows\ca-bundle.crt

However, the provided certificate may not be sufficient. Consider using the following trusted certificate root certificate bundle instead:

https://curl.haxx.se/ca/cacert.pem

Download this certificate bundle to your disk and update your php.ini file to point to its location:

curl.cainfo = "path_to_cert\cacert.pem"

Once the correct certificate is referenced, restart your WAMP service. This should resolve the SSL certificate problem and allow you to successfully run your PHP script.

The above is the detailed content of How to Resolve PHP cURL Error Code 60: SSL Certificate Issues on Windows?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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