2011-05-13 3 views
2

나는 페이스 북을위한 오픈 아이디 앱을 개발 중이다.PHP 잡히지 CurlException

나는이 오류가 무엇입니까 : 나는 창을 실행 해요

$e = new FacebookApiException(array(

:

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; 
} 

실제 라인 (614)은 다음과 같습니다

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

은 주위에이 코드가 7 및 WAMP와 PHP 5.2.11

답변

0

어떤 이유로 든 SSL 인증서를 확인하기를 원합니다. 당신은 또한 CURLOPT_SSL_VERIFYHOST 설정뿐만 아니라 그에 확인해야 할 수 있습니다

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.

(curl에서) : 당신은 작업을 계속 곱슬 곱슬 할 수 있습니다.

당신은이 링크를 통해 같아야합니다 http://forum.developers.facebook.net/viewtopic.php?pid=258460

+2

비활성화 검증은 확실히 스크립트 작업을하지만, 보안 측면에서 끔찍한 생각합니다. 피어 검증은 이유 때문에 SSL의 일부입니다. –

+3

@AdamKalsey 실제 해결책은 호스트에 CA 인증서를 추가하는 것입니다. 단순히 downvoting하고 막연한 의견을 남기지 않고 광산에 대항하는 "보안"을 보장하는 답변을 환영합니다. 누구에게 도움이되지 않습니다. –

+1

@BradFJacobs CA 인증서를 내 호스트에 어떻게 추가합니까? – Marcel

관련 문제