search

Home  >  Q&A  >  body text

apns - PHP的iOS推送出问题了!Failed to connect: 13 Permission denied

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Permission denied) in /var/www/html/MyWork/apns/index.php on line 50
Failed to connect: 13 Permission denied 

请问这是怎么回事啊!!很急~网上说的好多方法都不起作用
然后换了一个文件:

php\Warning: stream_socket_client(): Unable to set private key file `/var/www/html/MyWork/apns/cert.pem' in /var/www/html/MyWork/apns/index.php on line 50
Warning: stream_socket_client(): failed to create an SSL handle in /var/www/html/MyWork/apns/index.php on line 50
Warning: stream_socket_client(): Failed to enable crypto in /var/www/html/MyWork/apns/index.php on line 50
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /var/www/html/MyWork/apns/index.php on line 50
Failed to connect: 0 

又出现了上面的错误。表示完全晕了

伊谢尔伦伊谢尔伦2902 days ago584

reply all(4)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-10 15:14:24

    'Permission denied' 应该是权限的问题。
    可以试试用管理员权限运行下。

    reply
    0
  • 怪我咯

    怪我咯2017-04-10 15:14:24

    顶楼上,试试root

    reply
    0
  • PHP中文网

    PHP中文网2017-04-10 15:14:24

    和php关系不大,跟ios也没啥关系。。。权限问题

    reply
    0
  • PHPz

    PHPz2017-04-10 15:14:24

    linux上,权限777了,还是这个问题,应该不是权限问题吧?

    reply
    0
  • Cancelreply