note 55199 added to function.mysql-connect

From: Date: Wed, 27 Jul 2005 14:23:08 +0000
Subject: note 55199 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-92558@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55199 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55199&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55199&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55199&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55199&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55199&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55199&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55199&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92558) next »