感谢您阅读我的问题。我正在尝试从 PHP(安装在 Amazon EC2 上)发送推送通知,代码在 localhost 上工作,但是当移动到 EC2 时,它给出了错误:
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: ...
pem 文件的路径是正确的(我尝试了绝对路径)。感谢帮助!