2011-03-09 9 views
0

PHP 스크립트를 사용하여 apache 웹 서버에서 푸시 알림을 전송했습니다. 그런 다음 전체 코드와 html을 IIS로 전송했습니다. 푸시 알림을 보내려고하면, 내가 경고 다음 얻을 :IIS 푸시 알림 서비스 (IIS 서버의 PHP)

Warning (2): stream_socket_client() [http://php.net/function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages: 
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure [APP\controllers\push_notifications_controller.php, line 79]Code | Context$text = "test from hugh" 
$apnsHost = "gateway.sandbox.push.apple.com" 
$apnsPort = 2195 
$apnsCert = "../vendors/certificate.pem" 
$streamContext = resource 
$error = 0 
$errorString = ""stream_socket_client - [internal], line ?? 
PushNotificationsController::__send_push_notification() - APP\controllers\push_notifications_controller.php, line 79 
PushNotificationsController::index() - APP\controllers\push_notifications_controller.php, line 58 
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204 
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171 
require - APP\webroot\index.php, line 83 
[main] - CORE\index.php, line 55 

나는 뭔가 certificate.pem 파일에 문제가 있습니다, 또는 IIS에서 SSL을 처리하는 방식이라고 생각합니다. 도와 주실 수 있겠습니까?

답변

0

먼저 방화벽의 포트 (2195 및 2196)가 열려 있는지 확인해야합니다.

기타 : Error Using PHP for iPhone APNS < - 인증서에 문제가 있다고 대답했습니다.