Home > Backend Development > PHP Tutorial > How to Fix cURL Error Code 60 \'SSL Certificate Problem\' in Amazon PHP SDK on Windows?

How to Fix cURL Error Code 60 \'SSL Certificate Problem\' in Amazon PHP SDK on Windows?

Mary-Kate Olsen
Release: 2024-10-25 03:11:02
Original
1088 people have browsed it

How to Fix cURL Error Code 60

How to Resolve PHP cURL Error Code 60 While Using Amazon PHP SDK

When attempting to establish a PHP environment on Windows using WAMP and the Amazon PHP SDK, a user encounters error code 60: "SSL certificate problem: unable to get local issuer certificate."

Problem Details:

The error message indicates that cURL is unable to locate the certificate's issuer during SSL verification. This can occur when the local certificate bundle is missing or invalid.

Original Resolution Attempt:

The user has added the following line to php.ini:

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

However, this has not resolved the issue.

Alternative Solution:

  1. Obtain the Root Certificate Bundle: Download the CA certificate root certificate bundle from: https://curl.haxx.se/ca/cacert.pem.
  2. Save the Bundle: Copy the certificate bundle to your disk and store it in a known location.
  3. Update php.ini: Modify php.ini to use the new certificate bundle:
curl.cainfo = "path_to_cert\cacert.pem"
Copy after login

Restart your web server and attempt to run the sample test again. The error code 60 should be resolved.

The above is the detailed content of How to Fix cURL Error Code 60 \'SSL Certificate Problem\' in Amazon PHP SDK on Windows?. For more information, please follow other related articles on the PHP Chinese website!

source:php
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