Hi,
I seem to have this problem after upgrading to PHP 5.3 from 5.2.
The site runs off index.php which includes() various other utility functions then includes the correct page based on GET variable value.
Now one thing I cannot understand is that in xdebug I dont see $GLOBALS. The other bit is -
index.php:
include_once('includes/global.inc.php');
include_once("classes/db.inc.php");
$db = new db();
global.inc.php:
$glob['dbusername'] = 'myusername';
$glob['dbpassword'] = 'mypassword';
//etc
db.inc.php declares a class called db:
class db
{
function db()
{
global $glob;
$this->db = @mysql_connect($glob['dbhost'], $glob['dbusername'], $glob['dbpassword']);
}
} // end of db class
The issue is that if i put a breakpoint in db(), i cannot see $glob and the debugger says its uninitialized.