Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection timed out) in /home/biranchi/public_html/push.php on line 42 Failed to connect 110
I am using the certificate, and the private key
$ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', $certfile); stream_context_set_option($ctx, 'ssl', 'passphrase', $pass); $fp = stream_socket_client('ssl://gateway.xyz.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);
Its running in my local XAMPP Server , but its not working in the external server
What is the error ? Do i need to change some setting in the server ?
I had fixed the issue by opening the port 2195 on the production server. You can verify by following command $telnet gateway.push.apple.com 2195
-bash-3.2# telnet gateway.push.apple.com 2195 Trying 126.96.36.199... Connected to gateway.push.apple.com (188.8.131.52). Escape character is '^]'. Connection closed by foreign host.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki