[PHP-DB] Programs not Running - SOLVED

2013-01-06 Thread Ethan Rosenberg, PhD

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



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



RE: [PHP-DB] Programs not Running - SOLVED

2013-01-06 Thread Brad
Permissions?

-Original Message-
From: Ethan Rosenberg, PhD [mailto:erosenb...@hygeiabiomedical.com] 
Sent: Sunday, January 06, 2013 8:18 PM
To: PHP Database List
Subject: [PHP-DB] Programs not Running - SOLVED

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



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


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