错误[13]:访问被拒绝 - 在Apache Thrift生成的PHP客户端
问题描述:
我正在使用Apache thrift进行PHP-JAVA桥接。一个java服务器文件,它通过某个端口xxxx上的php客户端访问。错误[13]:访问被拒绝 - 在Apache Thrift生成的PHP客户端
这是在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,但它的不工作。这里有什么问题?
答
发现它是selinux的问题。禁用它,所以httpd有权限进行网络连接。
谢谢