I am facing problem in connecting to APNS by using PHP. According to my learning so far :-
- Cerificate, private key and passphrase are correct because I have tested it using third party notification providers, also it works on my server for some time and then it stops working.
- It is configured correctly in the app because I can receive the notifications sometimes.
So in short, it works fine for 2-3 times, then it just stops working with following Errors :
Warning: stream_socket_client() [function.stream-socket-client]: SSL: Connection reset by peer in /home/sites/mydomain.com/public_html/saloon-app/webservices/test.php on line 52
Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto in /home/sites/mydomain.com/public_html/saloon-app/webservices/test.php on line 52
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Unknown error) in /home/sites/mydomain.com/public_html/saloon-app/webservices/test.php on line 52
ERROR:: CODE(0):: bool(false)