简体   繁体   English

卷曲-错误60-GuzzleHttp

[英]Curl - error 60 - GuzzleHttp

What can cause an error 60 for cURL? 什么会导致cURL错误60? Certificate is identical to the one used in local environment but raises an error on production. 证书与本地环境中使用的证书相同,但是会在生产中产生错误。


(original problem) (原始问题)

So I'm trying to integrate Illuminate\\Socialize into my app, with a Facebook login. 因此,我试图通过Facebook登录将Illuminate\\Socialize集成到我的应用程序中。 It all seems to work out fine locally, and on my production server I obtain the following error: 在本地看来一切正常,在我的生产服务器上,我收到以下错误:

RequestException in MultiAdapter.php line 234:
[curl] (#60) See http://curl.haxx.se/libcurl/c/libcurl-errors.html
for an explanation of cURL errors [url]

https://graph.facebook.com/oauth/access_token?client_id={client_id}
&client_secret={secret}&code={code}&redirect_uri={redirect-uri}

It seems that error 60 comes from a certificate error. 似乎错误60来自证书错误。 A few points: 几点:

  • My Google module works in production as expected. 我的Google模块可以按预期方式投入生产。
  • I'm on shared hosting. 我正在共享主机上。
  • The redirect-uri is authorized redirect-uri已授权

Any directions on a solution would be greatly appreciated! 解决方案的任何指示将不胜感激!


Edit: I managed to make it work twisting Adapter\\Curl\\CurlFactory.php , adding after curl_init 编辑:我设法使它工作扭曲Adapter\\Curl\\CurlFactory.php ,在curl_init之后curl_init

curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);

Although it is only a quick-fix as it looks insecure. 尽管这只是一种快速修复方法,但它看起来并不安全。 On the same location, I tried adding 在同一位置,我尝试添加

curl_setopt($handle, CURLOPT_CAINFO, dirname(__FILE__) . '/../../cacert.pem');

(+verifypeer to true), but it has no effect... anybody? (+ verifypeer为true),但没有效果...有人吗?

这可能与Guzzle和HTTPS中的问题相同-请在https://stackoverflow.com/a/29588396/413531上查看我的答案,并检查是否明确提供新下载的cacert.pem文件可以解决您的问题(请仔细检查该文件的路径有效!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM