开发者

NuSOAP / fsockopen error - Couldn't open socket connection to server , Error (13): Permission denied

开发者 https://www.devze.com 2023-01-20 13:14 出处:网络
I have a php application using NuSOAP on a RHEL5/CentOS dedicated system. I\'m runing into the following error:

I have a php application using NuSOAP on a RHEL5/CentOS dedicated system.

I'm runing into the following error:

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

I think its related to some httpd configuration - as per http://www.linuxdevelop.com/redhat--fedora-linux-help/fsockopen-error-13-permission-denied-24366.shtml

I found the problem was related to SELinux configuration.

The firewall is enabled on my server: policy type is targeted, enforcing current is checked and HTTPD scripts to connect to the network were not allowed.

Where: Desktop > System Settings > Security Level > SELinux > httpd > HTTPD scripts to connect to the network was unchecked. I checked it and it is working now.

But I wasnt able to find how to modify this directly within the 开发者_如何学Chttpd.conf file


setsebool -P httpd_can_network_connect 1

check this url: http://yml.com/fv-b-1-619/selinux--apache-httpd--php-establishing-socket-connections-using-fsockopen---et-al.html

0

精彩评论

暂无评论...
验证码 换一张
取 消