Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is connected with http://stackoverflow.com/questions/3985115/nusoap-fsockopen-error-couldnt-open-socket-connection-to-server-error-13

I think I am unable to have my php application get access to the network. The error reported is in the above link.

What the solution proposed in http://www.linuxforums.org/forum/red-hat-fedora-linux/46840-fsockopen-error-13-permission-denied.html is:

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.

How can I change httpd.conf to do the above?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I solved my problem partially.

http://fedoraproject.org/wiki/SELinux/apache

httpd scripts by default are not allowed to connect out to the network.
This would prevent a hacker from breaking into you httpd  server
and attacking other machines.  If you need scripts to be able to
connect you can set the httpd_can_network_connect boolean on.

setsebool -P httpd_can_network_connect 1

I ran this command and my script runs properly now, but I'm not sure if this setting will be retained if I restart the server / apache. Does anyone know what I have to do make this a 'permanent' setting?

share|improve this answer
    
I tested this by rebooting the server - the setting is retained –  matt74tm Oct 22 '10 at 11:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.