What can cause an error 60 for cURL? 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. 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. A few points:
- My Google module works in production as expected.
- I'm on shared hosting.
- The redirect-uri is authorized
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
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?