note 55199 deleted from function.mysql-connect by betz
| From: | betz@php.net | Date: | Sun, 02 Oct 2005 17:55:13 +0000 |
| Subject: | note 55199 deleted from function.mysql-connect by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96206@lists.php.net to get a copy of this message | ||
Note Submitter: cs at kainaw dot com
----
SELinux (used in Fedora) will block remote TCP/IP connections from PHP. Therefore, the following
command:
mysql_connect('127.0.0.1', 'username', 'password');
Will return Error 13: Permission denied.
I do not know enough about SELinux to make it allow PHP to make remote TCP/IP connections, but you
can change it from 'enforce' to 'permissive' to semi-disable SELinux. In the
config file (/etc/selinux/config) change 'SELINUX=enfoce' to
'SELINUX=permissive'.
This will not affect connections to 'localhost'. It only affects connections to IP
addresses.