Amazon MarketplaceWebServiceOrders requests suddenly failing, PHP curl giving SSL CA cert error? [duplicate]

心已入冬 提交于 2019-11-27 08:36:41

问题


This question already has an answer here:

  • PHP Problem with the SSL CA cert (path? access rights?) 6 answers

Starting at 4am Sunday, we suddenly started seeing errors from curl, from the Marketplace Web Service Orders PHP5 Library MarketplaceWebServiceOrders/Client.php script:

Caught Exception: Internal Error
Response Status Code: 0
Error Code: 
Error Type: 
Request ID: 
XML: 
ResponseHeaderMetadata: RequestId: , ResponseContext: , Timestamp: 

The actual curl error number is 77, with the message being:

Problem with the SSL CA cert (path? access rights?)

Interestingly, when I test with curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); I still get the same error. I also get the same error when using the following options:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAPATH, '/etc/pki/tls/certs/ca-bundle.crt');

It strikes me odd that this just suddenly stopped working this weekend. We haven't changed the code, nor has the server had any updates run at that time. How can I go about fixing this?


回答1:


We had the exact same problem this morning. It seems it has something to do with the bash update from last weekend.

We fixed the problem by simply restarting apache.

Edit:

For more information about the bash update you can also check http://www.troyhunt.com/2014/09/everything-you-need-to-know-about.html



来源:https://stackoverflow.com/questions/26099849/amazon-marketplacewebserviceorders-requests-suddenly-failing-php-curl-giving-ss

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!