2

Thanks for reading my question. I'm trying to send push notification from PHP (installed on Amazon EC2), code works on localhost but when move to EC2, it give error:

PHP Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in ... on line 24, referer: ... PHP Warning: stream_socket_client(): Failed to enable crypto in ... on line 24, referer: ... PHP Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in ... on line 24, referer: ...

Path to pem file is correct (I tried absolute path). Thanks for help!

Charles
  • 50,943
  • 13
  • 104
  • 142
Martin Pham
  • 138
  • 2
  • 9

1 Answers1

0

Your connection to apple servers are currently dropped from the ec2 default firewall (the default profile only allows ports 22 and 80 if I remember correctly). You have to allow ports 2195-2196 at your ec2 security group.

tix3
  • 1,142
  • 8
  • 17