Home  >  Article  >  Backend Development  >  How to Troubleshoot and Resolve PHP cURL Error Code 60 in a Windows Environment?

How to Troubleshoot and Resolve PHP cURL Error Code 60 in a Windows Environment?

Susan Sarandon
Susan SarandonOriginal
2024-10-25 08:16:29712browse

How to Troubleshoot and Resolve PHP cURL Error Code 60 in a Windows Environment?

PHP cURL Error Code 60: Troubleshooting and Resolution

When attempting to use the Amazon PHP SDK in a Windows environment (with WAMP), users may encounter a "cURL resource: Resource id #10; cURL error: SSL certificate problem" error with code 60.

To address this issue, the following steps should be considered:

  • Ensure a Valid CA Bundle:

The error indicates a problem with the SSL certificate chain. Verify that you have a trusted certificate authority (CA) bundle installed. Download the root certificate bundle from https://curl.haxx.se/ca/cacert.pem, save it to your local disk, and specify its location in php.ini using:

curl.cainfo = "path_to_cert/cacert.pem"
  • Restart WAMP Service:

Once the ca info is updated in php.ini, it's important to restart the WAMP service to ensure the changes take effect.

By implementing these steps, you can resolve PHP cURL error code 60 and establish a secure connection to the Amazon API Gateway.

The above is the detailed content of How to Troubleshoot and Resolve PHP cURL Error Code 60 in a Windows Environment?. 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