Programs not Running - SOLVED
| From: | Ethan Rosenberg, PhD | Date: | Mon, 07 Jan 2013 00:17:31 +0000 |
| Subject: | Programs not Running - SOLVED | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-48620@lists.php.net to get a copy of this message | ||
Dear List -
Thanks to all for your help.
The problem was in this piece of code:
require '/var/www/pass.inc';
$db = "Store";
$cxn = mysqli_connect($host,$user,$password,$db);
if ( !$cxn ) {
die( 'connect error: '.mysqli_connect_error() );
}
I had moved the password file [/var/www/pass.inc] out of root, but forgot to change the code!
This still leaves a question:
if ( !$cxn ) {
die( 'connect error: '.mysqli_connect_error() );
}
Why did the above code catch the error??
Ethan