在终端中作为PHP simplepush.php运行php时,无法获取这些错误
Warning: stream_socket_client(): Unable to set private key file `/users/accenture/Desktop/newAPNS/ck.pem' in /users/accenture/Desktop/newAPNS/simplepush.php on line 22
Warning: stream_socket_client(): failed to create an SSL handle in /users/accenture/Desktop/newAPNS/simplepush.php on line 22
Warning: stream_socket_client(): Failed to enable crypto in /users/accenture/Desktop/newAPNS/simplepush.php on line 22
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /users/accenture/Desktop/newAPNS/simplepush.php on line 22
Failed to connect: 0
我使用raywenderlich文章http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1#comments创建了所有证书和pem文件
发布于 2015-02-11 05:22:00
在http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1中将密钥文件转换为pem推荐文件给我带来了问题。
正在运行
openssl pkcs12 -in keyname.p12 -out keyname.pem -nodes -clcerts
而不是
openssl pkcs12 -nocerts -out keyname.pem -in keyname.p12
解决了我的问题。
https://stackoverflow.com/questions/26890378
复制相似问题