2

This is connected with https://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?

siliconpi
  • 1,807
  • 6
  • 32
  • 46

1 Answers1

3

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?

siliconpi
  • 1,807
  • 6
  • 32
  • 46