使用PHP for iPhone APNS时出错

时间:2009-06-30 10:36:09

标签: php iphone iphone-sdk-3.0 push-notification

我从用于向APNS发送消息的PHP代码中收到此错误消息...是否有人遇到过同样的问题?

Warning: stream_socket_client() [function.stream-socket-client]: SSL operation 
failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:
SSL3_READ_BYTES:sslv3 alert handshake failure in 
/Library/WebServer/Documents/anish/apns/2.php on line 8

Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable 
crypto in /Library/WebServer/Documents/anish/apns/2.php on line 8

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect 
to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /Library/WebServer
/Documents/anish/apns/2.php on line 8
Failed to connect: 0

Warning: fclose(): supplied argument is not a valid stream resource in   
/Library/WebServer/Documents/anish/apns/2.php on line 20*

它似乎总是无法连接到gateway.sandbox.push.apple.com。我甚至尝试使用PushMeBaby,它也无法连接到gateway.sandbox.push.apple.com

1 个答案:

答案 0 :(得分:4)

问题显然是安装证书。如果证书安装得当,那么一切都很有魅力......!