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

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

问题描述

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

 致命错误:未捕获异常'cURL_Exception',消息'cURL resource:Resource id#10; cURL错误:SSL证书问题:无法获取本地颁发者证书(cURL错误代码60)。有关错误代码的说明,请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html。C:\wamp\www\AWSSDKforPHP \lib \requestcore \requestcore。 class.php on line 848 

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

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

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



复制此证书包。并使用 php.ini

  curl.cainfo =path_to_cert \cacert.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:\wamp\www\AWSSDKforPHP\lib\requestcore\requestcore.class.php on line 848

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

curl.cainfo = C:\Windows\ca-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_cert\cacert.pem"

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

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