I'm getting this error after fresh install of Joomla 2.5.11 on Xampp 1.8.1:
Fatal error: Call to a member function setDebug() on a non-object in C:\xampp\htdocs\mysite.com\libraries\joomla\factory.php on line 309
The code in that file looks like this:
300 public static function getDbo()
301 {
302 if (!self::$database)
303 {
304 //get the debug configuration setting
305 $conf = self::getConfig();
306 $debug = $conf->get('debug');
307
308 self::$database = self::createDbo();
309 self::$database->setDebug($debug);
310 }
311
312 return self::$database;
313 }
I created the database before installation, and if i look into it i can see all joomla tables was created after installation process; so it seems it's not related to database connection problem. So, what could it be?
Note: I checked twice the download from official Joomla site, and i'm sure the package was downloaded correctly.
Update: Just tried Joomla 2.5.9 and got the same error. Something seems to be wrong with my environment (but only for Joomla, Drupal is working ok!)
Update 2: *Following @nibra suggestion, i put *
var_export(self::$database);
exit;
after line 308.
**The output looks like this:
JDatabaseMySQLi::__set_state(array( 'name' => 'mysqli',
'nameQuote' => '`',
'nullDate' => '0000-00-00 00:00:00',
'dbMinimum' => '5.0.4',
'database' => 'psychology',
'connection' => mysqli::_set_state(array( 'affected_rows' => NULL,
'client_info' => NULL,
'client_version' => NULL,
'connect_errno' => NULL,
'connect_error' => NULL,
'errno' => NULL,
'error' => NULL,
'error_list' => NULL,
'field_count' => NULL,
'host_info' => NULL,
'info' => NULL,
'insert_id' => NULL,
'server_info' => NULL,
'server_version' => NULL,
'stat' => NULL,
'sqlstate' => NULL,
'protocol_version' => NULL,
'thread_id' => NULL,
'warning_count' => NULL,
)),
'count' => 0,
'cursor' => NULL,
'debug' => false,
'limit' => 0,
'log' => array ( ),
'offset' => 0,
'sql' => NULL,
'tablePrefix' => 'fqd1p_',
'utf' => true,
'errorNum' => 0,
'errorMsg' => NULL,
'hasQuoted' => false,
'quoted' => array ( ),
))
Update 3: the output after commenting exit:
JDatabaseMySQLi::__set_state(array( 'name' => 'mysqli',
'nameQuote' => '`',
'nullDate' => '0000-00-00 00:00:00',
'dbMinimum' => '5.0.4',
'_database' => 'psychology',
'connection' => mysqli::__set_state(array( 'affected_rows' => NULL,
'client_info' => NULL,
'client_version' => NULL,
'connect_errno' => NULL,
'connect_error' => NULL,
'errno' => NULL,
'error' => NULL,
'error_list' => NULL,
'field_count' => NULL,
'host_info' => NULL,
'info' => NULL,
'insert_id' => NULL,
'server_info' => NULL,
'server_version' => NULL,
'stat' => NULL,
'sqlstate' => NULL,
'protocol_version' => NULL,
'thread_id' => NULL,
'warning_count' => NULL,
)),
'count' => 0,
'cursor' => NULL,
'debug' => false,
'limit' => 0,
'log' => array ( ),
'offset' => 0,
'sql' => NULL,
'tablePrefix' => 'fqd1p_',
'utf' => true,
'errorNum' => 0,
'errorMsg' => NULL,
'hasQuoted' => false,
'quoted' => array ( ),
))
Well, there is a little difference:
'_database' => 'psychology',
'connection' => mysqli::__set_state(array( 'affected_rows' => NULL,
instead of
'database' => 'psychology',
'connection' => mysqli::_set_state(array( 'affected_rows' => NULL,
What the hack that means?