推送通知连接错误 [英] push notification connecting error
问题描述
我使用的PHP脚本在我的应用推通知。但在以下行
I'm using php script for pushing notification on my application. But on following line
$fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);"
其中,
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
我得到一个错误如下:
I get an error as follows:
警告:在stream_socket_client():SSL操作失败,code 1结果
OpenSSL的错误消息:
错误:14094416:SSL例程:SSL3_READ_BYTES:在/Users/amit/Desktop/NotificationFolder/apns.php SSLv3的警报证书未知在线29
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
警告:在stream_socket_client():失败,使在线29 /Users/amit/Desktop/NotificationFolder/apns.php加密
Warning: stream_socket_client(): Failed to enable crypto in /Users/amit/Desktop/NotificationFolder/apns.php on line 29
警告:在stream_socket_client():无法连接到SSL:在/Users/amit/Desktop/NotificationFolder/apns.php 2195(未知错误)上线29
无法连接0
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
做任何一个知道如何摆脱这个问题占地
除了这一切工作正常。
Do any one know how to get rid of this problem?? Beside it everything works fine.
推荐答案
这可能会帮助您:
- Error Using PHP for iPhone APNS
- Getting errors using APNS PHP
这篇关于推送通知连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!