Jump to content



- - - - -

Fatal error:...Please ensure that the class definition navigationhistory...


This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1   darkxer0x

darkxer0x
  • Members
  • 2 posts

Posted 19 February 2009 - 12:16 PM

I get this error

Quote

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition navigationhistory of the object you are trying to operate on was loaded _before_ the session was started in host/catalog/includes/application_top.php on line 309

This error is not new. Existing solutions as this don´t resolve the problem, because it makes the cart be always empty:
Solution:

Quote

// navigation history
if (tep_session_is_registered('navigation')) {
if (PHP_VERSION < 4) {
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
} else {
$navigation = new navigationHistory;
}

} else {
tep_session_register('navigation');
$navigation = new navigationHistory;
}
$navigation->add_current_page();
Problem:

Quote

If you add in a new declaration for $navigation to handle the case when the session is already registered, you throw away all the navigation history.

I´ve also seen another solution: create an .htaccess with php_flag session.auto_start 0 , but it doesn´t work.

Version: osCommerce 2.2-MS2

Edited by darkxer0x, 19 February 2009 - 12:30 PM.


#2   darkxer0x

darkxer0x
  • Members
  • 2 posts

Posted 20 February 2009 - 03:30 PM

Solved!
The problem was due to a change in /catalog/include/configure.php with some code like this:

Quote

define('DB_SERVER_USERNAME', 'username');
  define('DB_SERVER_PASSWORD', 'pass');
  //define('DB_DATABASE', 'db');

session_start();
  if (isset($_GET['REMOTE_DATABASE_CONFIG']))
  .....................................................................

I set configure.php as default, and  it works perfect.