0
我使用PHP腳本成功發送了來自Apache web服務器的推送通知。然後我將完整的代碼和html轉移到IIS。嘗試發送推送通知後,我得到以下警告:在IIS服務器上使用PHP的Apple推送通知服務
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的方式。能否請你幫忙?