【发布时间】:2011-06-08 13:08:40
【问题描述】:
今天突然出现一个非常奇怪的错误,说它无法连接到适当的网关...有什么修复建议吗?
这是记录器的输出:
Wed, 08 Jun 2011 15:05:44 +0200 ApnsPHP[21724]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Wed, 08 Jun 2011 15:05:45 +0200 ApnsPHP[21724]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195': (0)
Wed, 08 Jun 2011 15:05:45 +0200 ApnsPHP[21724]: INFO: Retry to connect (1/3)...
Wed, 08 Jun 2011 15:05:46 +0200 ApnsPHP[21724]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Wed, 08 Jun 2011 15:05:47 +0200 ApnsPHP[21724]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195': (0)
Wed, 08 Jun 2011 15:05:47 +0200 ApnsPHP[21724]: INFO: Retry to connect (2/3)...
Wed, 08 Jun 2011 15:05:48 +0200 ApnsPHP[21724]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Wed, 08 Jun 2011 15:05:48 +0200 ApnsPHP[21724]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195': (0)
Wed, 08 Jun 2011 15:05:48 +0200 ApnsPHP[21724]: INFO: Retry to connect (3/3)...
Wed, 08 Jun 2011 15:05:49 +0200 ApnsPHP[21724]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Fatal error: Uncaught exception 'ApnsPHP_Exception' with message 'Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195': (0)' in /home/xxxx/xxxxx/ApnsPHP/Abstract.php:354
【问题讨论】:
-
请添加更多信息... 您的 ApnsPHP 配置是什么?你之前有什么改变吗?
-
不,没有进行任何更改
-
将此添加到脚本的开头 ini_set("display_errors", 1); 并查看是否有任何 php 错误(不要忘记在生产中删除此行)
-
不,没有任何 php 错误...可能是苹果自己的服务器有问题吗?我尝试了最初随 ApnsPHP 提供的“sample_push.php”,它得到了同样的错误....
-
不,我有一个发送推送通知的网页(通过沙盒和“实时”服务器),我在大约 30 分钟前测试了这两个页面,它正在工作。
标签: php apple-push-notifications