错误[13]:访问被拒绝 - 在 Apache Thrift 生成的 PHP 客户端上
我正在使用 Apache thrift 进行 PHP-JAVA 桥接。一个java服务器文件,由php客户端在某个端口xxxx上访问。
这在 Windows 中工作正常,但是当我在 CentOS 6 中执行此操作时,它给了我访问被拒绝错误,如下所示:
Fatal error: Uncaught exception 'TException' with message 'TSocket:
Could not connect to localhost:xxxx (Permission denied [13])'
in /var/www/html/Thrift/transport/TSocket.php:229
Stack trace: #0 /var/www/html/Thrift/transport/TBufferedTransport.php(82):
TSocket->open() #1 /var/www/html/FileGateway.php(19): TBufferedTransport->open()
#2 {main} thrown in /var/www/html/Thrift/transport/TSocket.php on line 229
尝试将文件权限更改为 777。但它不起作用。这里有什么问题呢?
I'm using a PHP-JAVA bridging using Apache thrift. A java server file, it is accesses by a php client on some port xxxx.
This is working fine in Windows, but when i did it in CentOS 6, its giving me Access Denied Error, somthing like given below:
Fatal error: Uncaught exception 'TException' with message 'TSocket:
Could not connect to localhost:xxxx (Permission denied [13])'
in /var/www/html/Thrift/transport/TSocket.php:229
Stack trace: #0 /var/www/html/Thrift/transport/TBufferedTransport.php(82):
TSocket->open() #1 /var/www/html/FileGateway.php(19): TBufferedTransport->open()
#2 {main} thrown in /var/www/html/Thrift/transport/TSocket.php on line 229
Tried to change the file permissions to 777. but its not working. What is the problem here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现是selinux的问题。禁用它,这样httpd就有了netwrking的权限。
谢谢
Found it was the problem with selinux. Disabled it , so httpd have the permission to netwrking.
Thanks