MythWeb: Howto fix "fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:6543 (Permission denied)" error 4

Posted by ryan
at 9:32 AM on Tuesday, September 27, 2005



I’ve recently embarked on the resurrection of my mythtv project that had been reclaimed for other uses. This time around I’m using Fedora Core 4 and Jarod’s still very authoritative tutorial, which got me completely up and running. However, when I tried to run mythweb I kept getting this error:

Warning at /var/www/html/mythweb/includes/mythbackend.php, line 102:
fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:6543 (Permission denied)

After digging around a little bit I figured out that this occurs when you have SELinux installed – which prevents the opening of a socket to the backend from mythweb. To fix this I simply followed these instructions, which say to set the following config value in ”/etc/selinux/config”:

SELINUX=disabled

After a reboot, all is well.

Comments

Leave a response

  1. Ryan LarsonJanuary 02, 2007 @ 02:57 PM
    Or you could simply allow your httpd server to make an outbound (to 127.0.0.1) connection via this command setsebool -P httpd_can_network_connect 1 This method does not require a reboot.
  2. deviMarch 03, 2008 @ 06:01 AM

    fsockopen() [function.fsockopen]: unable to connect

  3. renjithMarch 10, 2008 @ 12:14 AM

    what to do if it happends in windows

  4. renjithMarch 10, 2008 @ 12:14 AM

    what to do if it happens in windows

Comment