1

我有一个在 RHEL5/CentOS 专用系统上使用 NuSOAP 的 php 应用程序。

我遇到以下错误:

2010-10-21 06:23:43.374471 soap_transport_http: entered send() with data of length: 1693
2010-10-21 06:23:43.374510 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host www.mysite.com, port 2194
2010-10-21 06:23:43.374557 soap_transport_http: calling fsockopen with host www.mysite.com connection_timeout 0
2010-10-21 06:23:43.700553 soap_transport_http: Couldn't open socket connection to server http://www.mysite.com:2194/webservice.event, Error (13): Permission denied
2010-10-21 06:23:43.700719 nusoap_client: Error: HTTP Error: Couldn't open socket connection to server http://www.mysite.com:2194/webservice.event, Error (13): Permission denied

我认为它与一些 httpd 配置有关 - 根据http://www.linuxdevelop.com/redhat--fedora-linux-help/fsockopen-error-13-permission-denied-24366.shtml

我发现问题与 SELinux 配置有关。

我的服务器上启用了防火墙:策略类型为目标,检查了强制执行电流,并且不允许使用 HTTPD 脚本连接到网络。

其中:桌面 > 系统设置 > 安全级别 > SELinux > httpd > 连接到网络的 HTTPD 脚本未选中。我检查了它,它现在正在工作。

但我无法找到如何直接在 httpd.conf 文件中修改它

4

1 回答 1

5

setsebool -P httpd_can_network_connect 1

检查这个网址:http: //yml.com/fv-b-1-619/selinux--apache-httpd--php-establishing-socket-connections-using-fsockopen---et-al.html

于 2011-07-18T09:28:51.450 回答