Error[13]: Access Denied -On Apache Thrift generated PHP client
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?
Found it was the problem with selinux. Disabled it , so httpd have the permission to netwrking.
Thanks
精彩评论