2010-12-28 19 views
4

내 응용 프로그램에서 푸시 알림을 위해 PHP 스크립트를 사용하고 있습니다. 그러나 다음 줄에 다음과 같이 푸시 알림 연결 오류

$ctx = stream_context_create(); 
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem'); 

내가 오류가

$fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);" 

:

Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown in /Users/amit/Desktop/NotificationFolder/apns.php on line 29

Warning: stream_socket_client(): Failed to enable crypto in /Users/amit/Desktop/NotificationFolder/apns.php on line 29

Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /Users/amit/Desktop/NotificationFolder/apns.php on line 29
Failed to connect 0

어느 하나를 수행하는 방법이 문제를 제거하기 위해 알고 ?? 모든 항목이 정상적으로 작동합니다.

+0

gateway.sandbox.push.apple.com에 연결할 때 [ "verify error : num = 20"(http://stackoverflow.com/a/23351633/608639)를 참조하십시오. 다음 세 가지 사항을 확인해야합니다. (1) TLS 1.0 이상. (2) 서버 남 표시; (3) * Entrust.net 인증 기관 (2048) * 루트. – jww

답변

0

당신의 인증서 암호는 무엇입니까? 정확하게 주어졌으며 인증서는 실제로 ck.pem에 있습니까? 어떻게 인증서를 만들었습니까?

+0

예! 암호를 올바르게 입력했는데 내 인증서가 내 ck.pem에 있습니다. 도움의 손길을 가져 주셔서 감사하지만, 더 많은 도움을 요청하십시오. 답장하기 – vicky1456