iPhone 推送通知无法连接到 SSL 服务器 [英] iPhone Push Notification Unable to Connect to the SSL Server

查看:26
本文介绍了iPhone 推送通知无法连接到 SSL 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照以下说明操作:

如何构建 Apple 推送通知提供程序服务器当我在 MacOSX 或使用 Parallel 桌面的 Windows 上运行 php 脚本时,该脚本有效.但是一旦我在我的主机上运行它,我就会收到消息:

How To Build An Apple Push Notification Provider Server When I run the php script on my MacOSX or on Windows using Parallel desktop, the script works. But as soon as I run it on my hosting I get the message:

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection timed out) in provider.php on line 23
Failed to connect 110 Connection timed out 

这与证书有关吗?如果是这样,我如何制作可以在我的主机所在的计算机上运行的证书.

Does this have to do with the certificates? If so how can I make a certificate that could work on the computer where my hosting is located.

推荐答案

您的托管服务提供商可能不允许到端口 2195 和 2196 的出站连接.大多数共享托管服务提供商都没有打开这些端口.您可能需要获得一个 VPS,或者您也可以尝试 UrbanAirship,它提供 Apple 通知服务集成,并且每月有一定的免费限制.

Your hosting provider probably does not allow outbound connections to ports 2195 and 2196. Most shared hosting providers do not have those ports open. You might need to get a VPS or you can also try UrbanAirship which provides Apple Notification Service integration and is free for a certain limit per month.

这篇关于iPhone 推送通知无法连接到 SSL 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆