Сервис push-уведомлений Apple в PHP на сервере IIS - PullRequest
0 голосов
/ 09 марта 2011

Я успешно отправил push-уведомление с веб-сервера apache с помощью PHP-скрипта.Затем я передал полный код и HTML в IIS.После попытки отправить push-уведомление я получаю следующее предупреждение:

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.Не могли бы вы помочь?

1 Ответ

0 голосов
/ 09 марта 2011

Сначала необходимо убедиться, что порты (2195 и 2196) на брандмауэре открыты.

Также: Ошибка при использовании PHP для iPhone APNS <- сказано, что это была проблема с сертификатом .. </p>

...