Pete D'Amelio Pete D'Amelio - 2 months ago 14
PHP Question

Uncaught CurlException: 77 : error setting certificate verify locations

I keep getting this same error. I just installed the SSL and no luck. I have checked out all the other posts but none of the solutions seemed to work for me.

Does anyone know what should I be doing ?


Fatal error: Uncaught CurlException: 77: error setting certificate
verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath:
none thrown in
/home/acmesoft/public_html/Oddsmaker/php_sdk/base_facebook.php on line
977


if ($result === false) {
$e = new FacebookApiException(array(
'error_code' => curl_errno($ch),
'error' => array(
'message' => curl_error($ch),
'type' => 'CurlException',
),
));
curl_close($ch);
throw $e;
}
curl_close($ch);
return $result;

Answer

I have the same error with you and this problem was solved, I just put this 2 lines

Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = false;
Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;

after your facebook apps definition

$facebook = new Facebook(array(
  'appId'  => 'xxx',
  'secret' => 'xxx',
  'cookie' => true,
  'perms' => 'publish_stream,read_stream,email',
  'domain' => 'example.com'
))
Comments