开发者

PHP Uncaught CurlException

I am developing an open id app for facebook.

I am getting this error:

Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed thrown in C:\wamp\www\x\modules\openid\facebook.开发者_开发问答php on line 614

Around there is this code:

 if (isset($opts[CURLOPT_HTTPHEADER])) {
  $existing_headers = $opts[CURLOPT_HTTPHEADER];
  $existing_headers[] = 'Expect:';
  $opts[CURLOPT_HTTPHEADER] = $existing_headers;
} else {
  $opts[CURLOPT_HTTPHEADER] = array('Expect:');
}

curl_setopt_array($ch, $opts);
$result = curl_exec($ch);
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;
}

The actual line 614 is:

  $e = new FacebookApiException(array(

I' m running windows 7 and WAMP with php 5.2.11


For whatever reason it wants you to verify the SSL Cert. You can make curl continue working with: (From curl )

CURLOPT_SSL_VERIFYHOST FALSE

to stop cURL from verifying the peer's certificate. Alternate certificates to verify against can be specified with the CURLOPT_CAINFO option or a certificate directory can be specified with the CURLOPT_CAPATH option. CURLOPT_SSL_VERIFYHOST may also need to be TRUE or FALSE if CURLOPT_SSL_VERIFYPEER is disabled (it defaults to 2). TRUE by default as of cURL 7.10. Default bundle installed as of cURL 7.10.

You may also need to check into that as well as the CURLOPT_SSL_VERIFYHOST setting.

You should also look over this link: http://forum.developers.facebook.net/viewtopic.php?pid=258460

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜