我在我的Macbook Air上成功运行了APNS代码,但是在另一台电脑上无法运行:
我检查了以下内容: 1. .pem文件(具体而言) 2. 程序
不能工作的计算机是:
Windows 7,XAMPP,支持OpenSSL,无防火墙
和
EC2 Linux服务器,已开放2195和2196端口。
还可能有其他问题导致我在php代码中得到这个错误?
Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195'
我知道可能是由于没有打开SSL,但我检查了phpInfo(),应该是正确的。
openssl
OpenSSL support enabled
OpenSSL Library Version OpenSSL 1.0.1c 10 May 2012
OpenSSL Header Version OpenSSL 0.9.8x
我在EC2服务器上尝试使用telnet,它给出了以下提示:
telnet gateway.push.apple.com 2195
Trying 17.149.36.239...
Connected to gateway.push-apple.com.akadns.net.
Escape character is '^]'.