首页 > 后端开发 > php教程 > apns - PHP的iOS推送出问题了!Failed to connect: 13 Permission denied

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

WBOY
发布: 2016-06-06 20:40:16
原创
1855 人浏览过

<code>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 
</code>
登录后复制
登录后复制

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

<code>php</code><code>\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 
</code>
登录后复制
登录后复制

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

回复内容:

<code>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 
</code>
登录后复制
登录后复制

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

<code>php</code><code>\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 
</code>
登录后复制
登录后复制

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

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

顶楼上,试试root

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

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

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板