Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[b]Fatal error: The script tried to execute a method [/b]


sasmello

Recommended Posts

Posted

I am getting this error when trying to navigate the site

 

Fatal error: 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 /u/www/home/sites/xxxxxx/htdocs/shop/includes/application_top.php on line 278

 

I saw these error in another post,but I checked the session.auto_start and it's enable (off).

 

I'm using a virtual host

 

Here's the server session configuration

 

PHP Version 4.1.2

 

Session Support enabled

 

Directive Local Value Master Value

session.auto_start Off Off

 

session.cache_expire 180 180

 

session.cache_limiter nocache nocache

session.cookie_domain no value no value

session.cookie_lifetime 0 0

session.cookie_path / /

session.cookie_secure Off Off

session.entropy_file no value no value

session.entropy_length 0 0

session.gc_maxlifetime 1440 1440

session.gc_probability 1 1

session.name PHPSESSID PHPSESSID

session.referer_check no value no value

session.save_handler files files

session.save_path /tmp /tmp

session.serialize_handler php php

session.use_cookies On On

 

Any help?

Many thanks.

  • 10 months 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.

Archived

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

×
×
  • Create New...