PHP cURL 错误代码 60 [英] PHP cURL error code 60

查看:34
本文介绍了PHP cURL 错误代码 60的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在 Windows 上设置 php 环境(使用 wamp)以使用 Amazon PHP SDK 时,当我尝试运行示例测试时,我收到以下错误:

致命错误:未捕获的异常cURL_Exception",消息为cURL 资源:资源 ID #10;cURL 错误:SSL 证书问题:无法获得本地颁发者证书(cURL 错误代码 60).有关错误代码的说明,请参阅 http://curl.haxx.se/libcurl/c/libcurl-errors.html.在 C:wampwwwAWSSDKforPHPlib
equestcore
equestcore.class.php 第 848 行

我已经在我的 php.ini 中添加了以下行

curl.cainfo = C:Windowsca-bundle.crt

这是我使用此 VBS 脚本创建的证书的位置

将此证书包复制到您的磁盘上.并在 php.ini

上使用它

curl.cainfo = "path_to_certcacert.pem"

Whilst trying to setup a php environment on windows (using wamp) to use the Amazon PHP SDK, when i try to run a sample test I get the following error:

Fatal error: Uncaught exception 'cURL_Exception' with message 'cURL resource: Resource id #10; cURL error: SSL certificate problem: unable to get local issuer certificate (cURL error code 60). See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of error codes.' in C:wampwwwAWSSDKforPHPlib
equestcore
equestcore.class.php on line 848

I have already added the following line to my php.ini

curl.cainfo = C:Windowsca-bundle.crt

which is the location of a certificate i created using this VBS script VBS-Script

I have restarted my WAMP service also.

解决方案

Use this certificate root certificate bundle:

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

Copy this certificate bundle on your disk. And use this on php.ini

curl.cainfo = "path_to_certcacert.pem"

这篇关于PHP cURL 错误代码 60的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆