1
votes

I have implemented Raywenderlich PHP code for sending push notifications. It is working fine on my local machine. But not working on my php server. When I am trying to hit, it is giving error "Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection timed out) "

Kindly tell if any one know about the issue. Any help will be appreciated.

1
Can you ping gateway.sandbox.push.apple.com using your webserver? - drmarvelous
I am not having SSH access till now. Any other way to ping? - Gopesh Gupta
Not particularly. It sounds like you are running this on a shared host which does not support some of the functions required to send a push notification via PHP - drmarvelous
Yes, this is shared hosting. Could I not do it through shared hosting? - Gopesh Gupta
It completely depends on the capabilities of your host. It seems in this case that your script/environment is not allowed to connect to outside networks. - drmarvelous

1 Answers

4
votes

Firewall blocking 2195 port you need to open same for gateway.sandbox.push.apple.com

Please verify using below command.

telnet gateway.sandbox.push.apple.com 2195

Please refer below link for details.

http://support.apple.com/kb/TS4264