Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal Error


ShineGirl

Recommended Posts

Posted

I've just managed to get around the script somehow not recognising languages, or even english as the default, and now I get this error when loading the main cart page:

 

Fatal error: Call to a member function on a non-object in /var/www/moo/includes/application_top.php on line 309

 

Line 309 reads:

$navigation->add_current_page();

 

Full Navigation section (inc. line 309):

// navigation history

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

} else {

tep_session_register('navigation');

$navigation = new navigationHistory;

}

$navigation->add_current_page();

 

Any ideas people? I'm not very familiar with php I'm afraid, so be gentle ;)

  • 2 weeks later...
Posted

After wresting briefly with this problem, I found the solution. The problem is that in some configurations (at least mine), the navigation history section in "application_top.php" doesn't catch the possibility that the session "navigation" variable is registered and the PHP version running is 4 or above. I'm really not quite sure what caused this huge oversight on the part of the developers (with all due respect).

 

Change the nagivation history chunk of code to read:

 

// 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();

 

and it should work just fine.

Posted

I shoulda posted a reply to myself earlier, but it slipped my mind!

 

The problem with mine was that during install, for some reason the database (including all tables) was created fine, but no data was entered into them.

 

The solution was to copy the sample database from the install files into the admin/backup directory (which i created), and restore it from the admin panel.

 

See this thread for full details!

Archived

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

×
×
  • Create New...