Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fatal error: Call to a member function add_current_page() on a non-object in catalog\includes\application_top.php on line 312


lotjonenjo

Recommended Posts

I get this fatal error:

Fatal error: Call to a member function add_current_page() on a non-object in \htdocs\catalog\includes\application_top.php on line 312

 

I was trying to set up purchase_without_account mod...

Help please....

 

 

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

Link to comment
Share on other sites

The fix can be found here:

 

Click Me

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

should be an issue when register globals is set to off.

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

}

replace with

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

$navigation=$_SESSION['navigation'];

}

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

  • 3 weeks later...
Thanks your fix worked for me. :)

I take that back... now I am getting an error 500 on checkout_shipping because of this fix. Line 18 calls to $navigation->set_snapshot(); which is what my error_log is reporting as the problem.

Link to comment
Share on other sites

  • 1 month later...

My hosting provider decided to upgrade his php to version 5 and turn off globals, and now I am getting the same error.

 

Ithought that if I overwrite the application_top.php with the version in the latest release, that would fix it, but the navigation history section does not appear anywhere at all not ever near line 125. SO where do I go now?

Link to comment
Share on other sites

Addendum

My hosting provider decided to upgrade his php to version 5 and turn off globals, and now I am getting the same error.

 

I thought that if I overwrite the application_top.php with the version in the latest release, that would fix it, but now, no products show on any page. visit http://www.cyberlink.net.au/ggl/ to see the effects! and suggestion?

Link to comment
Share on other sites

  • 3 weeks later...
How do I turn on the register_globals?

 

You can turn on register globals through your .htaccess file like this

 

php_flag register_globals on

----------------------------------

Shean Hoxie

Webmaster- Kids Juke Box

----------------------------------

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

I've just been through this myself while uploading Basic Design Pack 2.5. (I'd moved the includes/boxes files that were going to be replaced into a back-up folder... and mistakenly moved one too many!)

 

The trick is to

 

(1) delete your website cookies (customer-side: no need to delete admin settings) after you receive the "Fatal error: Call to a member function..." message.

(2) Open your website again (do not refresh) and

(3) the actual error path for the missing file should be displayed, looking something like this:

Warning:
require(xxxx/xxxx/xxxx.php) [function.require]: failed to open stream: No such file or directory in /xxxx.../catalog/xxxx.../xxxx.php on line xxx

That line (or lines) in xxxx.php should tell you exactly what's missing. Happy hunting!

 

-C.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...