Re: [PHP-DB] PHP5: Initial connection to the MySQL server is carried out using the apache webserver userid

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.