简体   繁体   English

错误[13]:访问被拒绝-在Apache Thrift上生成的PHP客户端

[英]Error[13]: Access Denied -On Apache Thrift generated PHP client

I'm using a PHP-JAVA bridging using Apache thrift. 我正在使用Apache Thrift进行PHP-JAVA桥接。 A java server file, it is accesses by a php client on some port xxxx. 一个Java服务器文件,它是由php客户端在某个端口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: 这在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 

Tried to change the file permissions to 777. but its not working. 试图将文件权限更改为777。但无法正常工作。 What is the problem here? 这里有什么问题?

Found it was the problem with selinux. 发现这是selinux的问题。 Disabled it , so httpd have the permission to netwrking. 禁用它,因此httpd有权进行netwrking。

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM