Re: PHP5: Initial connection to the MySQL server is carried out using the apache webserver userid

From: Date: Sun, 22 Feb 2009 21:41:42 +0000
Subject: Re: PHP5: Initial connection to the MySQL server is carried out using the apache webserver userid
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-45989@lists.php.net to get a copy of this message
Paul Will wrote:
Hi, When I attempt to connect to a MySQL database I have noticed that the initial connection is made using the "wwwrun" userid (this is the userid that my Apache2 webserver is running under.) This is the output I see from the Firefox "View Frame Info Function" Notice: Undefined index: db in /srv/www/htdocs/LMsummary.php5 on line 23 <br> Notice: Undefined index: user in /srv/www/htdocs/LMsummary.php5 on line 24 <br> Notice: Undefined index: pass in /srv/www/htdocs/LMsummary.php5 on line 25 <br> Notice: Undefined index: host in /srv/www/htdocs/LMsummary.php5 on line 26
Fix these errors and it'll probably connect as the right user. You're trying to access part of an array that doesn't exist, like this: $db = array(); mysql_connect($db['host'], $db['user'], $db['pass']); -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#45989) next »