On 1/6/2013 7:17 PM, Ethan Rosenberg, PhD wrote:
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??


You're asking why the die was reached rather than having a fatal error occur because the require couldn't be performed? Perhaps because there exists another "pass.inc" file somewhere in PHP's default search folders for the require, but it contained the wrong password?

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to