Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

darkxer0x

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

2 posts in this topic

I get this error

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:

// 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:

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

Share this post


Link to post
Share on other sites

Solved!

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

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.

Share this post


Link to post
Share on other sites