2011-09-19 58 views
0

我正在使用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,但它的不工作。這裏有什麼問題?

回答

0

發現它是selinux的問題。禁用它,所以httpd有權限進行網絡連接。

謝謝