Guest Posted February 11, 2009 Share Posted February 11, 2009 Hi, I used the code posted by enigma (changed the history). Should I change it back and use the second solution instead? Is there anything that could happen if I do not rectify the changes? Link to comment Share on other sites More sharing options...
morehawes Posted March 6, 2009 Share Posted March 6, 2009 try this: Thanks alot for this one, had me scratching my head! :D Joe. Joe MacMan strikes again! Always backup first before listening to me! Link to comment Share on other sites More sharing options...
sunrise99 Posted March 16, 2009 Share Posted March 16, 2009 Somehow seems the navigation parameter remains registered so the class is not instantiated. As a test try this: 1. Backup catalog\includes\application_top.php then open it locate this code: // 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(); Replace it with this // 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(); Many thanks!!!! This can fix the issue. Link to comment Share on other sites More sharing options...
Rubin Remus Posted May 8, 2009 Share Posted May 8, 2009 Just want to say a huge thanks to whoever managed to figure this out originally, and to everybody else... I love you guys... :-) Link to comment Share on other sites More sharing options...
gates2u Posted July 4, 2009 Share Posted July 4, 2009 Yes, this find and replace in Application_top worked great - had to do it to get Security Pro SecurityPro_installer.php to work. Link to comment Share on other sites More sharing options...
cwpollock Posted July 24, 2009 Share Posted July 24, 2009 My host upgraded to PHP 5.2.6 and all of the sudden I'm getting this error. I've tried all the recommended fixes and still it doesn't work. When I install the fix, and try to login, it doesn't redirect to the appropriate page. Any idea what might be causing this problem? Link to comment Share on other sites More sharing options...
faisalnext Posted July 27, 2009 Share Posted July 27, 2009 i have replace the code, as under, // 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(); Replace it with this // 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(); it is working fine, now, but problem is i am using wishlist contribution, it erros me Fatal error: Call to a member function restore_wishlist() on a non-object in /public_html/create_account.php 273 line create_account.php 273: $wishList->restore_wishlist(); Link to comment Share on other sites More sharing options...
cwpollock Posted July 27, 2009 Share Posted July 27, 2009 My host upgraded to PHP 5.2.6 and all of the sudden I'm getting this error. I've tried all the recommended fixes and still it doesn't work. When I install the fix, and try to login, it doesn't redirect to the appropriate page. Any idea what might be causing this problem? I found the problem that I was having and wanted to report it here for the benefit of others. The latest version of PHP installs a security feature called suhosin. This feature caused my OSC instance to stop working by throwing the error seen in this thread. I got it working by turning On the suhosin.simulation flag which essentially disables the security feature. Read about it here. http://www.hardened-php.net/suhosin/config...osin.simulation If you server permissions allow it you can probably add something like this to your .htaccess file: php_value suhosin.simulation 1 Link to comment Share on other sites More sharing options...
seogo Posted September 29, 2009 Share Posted September 29, 2009 Thank you, i had same problem and this code seems to fix it so far, i still have a lot to test. I also added code from duhy, seemes to be working just fine.Thank you both! Brilliant! works for me. I was banging my head off the wall for ages till I found this! Seo Go Link to comment Share on other sites More sharing options...
oneeezy Posted November 16, 2009 Share Posted November 16, 2009 i did it! yesssss! i feel like this huge weight is lifted off my dieing body. well thats how i feel.. Germ is the man! Windows Phone 7 Forum | Tricks, Tips, Hacks, Apps, and Games for your Windows Phone 7! Link to comment Share on other sites More sharing options...
Andybird Posted January 8, 2010 Share Posted January 8, 2010 Here is the final code that will correct Fatal error: Call to a member function on a non-object in... and will not recreate the navigtion each time you open a new page if the path is an object: // navigation history if (tep_session_is_registered('navigation')) { if (is_object($navigation)) { } else { $navigation = new navigationHistory; } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); that should replace the old code: // 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(); And here is the code that will correct Fatal error: Call to a member function count_wishlist() on a non-object in... for those who insalled Wishlist contribution: // wishlist data if (tep_session_is_registered('wishList')) { if (is_object($wishList)) { } else { $wishList = new wishlist; } } else { tep_session_register('wishList'); $wishList = new wishlist; } that should replace the old code: // wishlist data if(!tep_session_is_registered('wishList')) { tep_session_register('wishList'); $wishList = new wishlist; } Andybird Link to comment Share on other sites More sharing options...
seshalyn_pr Posted February 24, 2010 Share Posted February 24, 2010 Somehow seems the navigation parameter remains registered so the class is not instantiated. As a test try this: 1. Backup catalog\includes\application_top.php then open it locate this code: // 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(); Replace it with this // 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(); Oh God blessss you!!! geezzzzzzzzzzzzzzzzzz I'm going crazy with all of this, can't wait to finish editing all this stuff, so that I can get on with adding products, much easier stuff. thnk you thank you thank you!!! worked perfect!!! I Hate PHP, LoLssss Visit My Site, Any constructive comments and suggestions Welcome :) WARNING: IT'S STILL UNDER CONSTRUCTION, LOLS Link to comment Share on other sites More sharing options...
Andreas2003 Posted March 2, 2010 Share Posted March 2, 2010 Hm, I tried both solutions. First try: Add } else { $navigation = new navigationHistory; With this solution, the error disappeared, but the redirection from the Cart to the login-page to the checkout_shipping was broken !! Then, my second try was described here in Posting #10 from Gunter: Replace if (tep_session_is_registered('navigation')) { with if (tep_session_is_registered('navigation') && is_object($navigation)) { What about this solution?? With this one, the redirection is working and the error disappeared. Much better IMHO. What do you think about the solution of Gunter ? Thanks in advance, Andreas Link to comment Share on other sites More sharing options...
MrPhil Posted March 2, 2010 Share Posted March 2, 2010 http://www.oscommerce.com/forums/index.php?showtopic=346007 Link to comment Share on other sites More sharing options...
lei_tx Posted August 4, 2010 Share Posted August 4, 2010 Somehow seems the navigation parameter remains registered so the class is not instantiated. As a test try this: 1. Backup catalog\includes\application_top.php then open it locate this code: // 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(); Replace it with this // 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(); It makes navigation->add_current_page() not work! so this is not a good solution! Link to comment Share on other sites More sharing options...
lei_tx Posted August 4, 2010 Share Posted August 4, 2010 Just FYI. If you use the solution suggested in the posts before, you will loose the navigation history because the object is created again every time. Doing it like this is much better: Replace if (tep_session_is_registered('navigation')) { with if (tep_session_is_registered('navigation') && is_object($navigation)) { For some reason on some systems, the session variable is registered on the first object but the object doesn't persist. On my local Windows install it starts persisting after the second call. HTH Gunter if (tep_session_is_registered('navigation') && is_object($navigation)) { Also lose the navigation history. not a perfect solution! Link to comment Share on other sites More sharing options...
Guest Posted September 6, 2010 Share Posted September 6, 2010 guys this is a problem with browser and nothing is wrong with ur system, just clear your browsing history and cache files and restart your browser and the problem will be gone. above solutions are not really required. Link to comment Share on other sites More sharing options...
jonni5ive Posted October 8, 2010 Share Posted October 8, 2010 Just FYI. If you use the solution suggested in the posts before, you will loose the navigation history because the object is created again every time. Doing it like this is much better: Replace if (tep_session_is_registered('navigation')) { with if (tep_session_is_registered('navigation') && is_object($navigation)) { For some reason on some systems, the session variable is registered on the first object but the object doesn't persist. On my local Windows install it starts persisting after the second call. HTH Gunter Just wanted to say, thanks very much..and thankyou to anyone contributing problem solvers on this forum...couldn't believe after all that had been done it threw an error at me like this, thought I was doomed, but this solved the issue straight away!!! I'm not and never have been literate with php, learning now though!, have to say I'm very glad I did the initial forum reading and research, I read someones advice somewhere to not install 'STS' stick with raw php and you'll get there, have to say so far that information has been priceless, thanks again Gunter. Link to comment Share on other sites More sharing options...
tharring Posted October 11, 2010 Share Posted October 11, 2010 THANK YOU! This is great information! It worked for me. Tedra - - - - - Just FYI. If you use the solution suggested in the posts before, you will loose the navigation history because the object is created again every time. Doing it like this is much better: Replace if (tep_session_is_registered('navigation')) { with if (tep_session_is_registered('navigation') && is_object($navigation)) { For some reason on some systems, the session variable is registered on the first object but the object doesn't persist. On my local Windows install it starts persisting after the second call. HTH Gunter Link to comment Share on other sites More sharing options...
noa Posted November 1, 2010 Share Posted November 1, 2010 Somehow seems the navigation parameter remains registered so the class is not instantiated. As a test try this: 1. Backup catalog\includes\application_top.php then open it locate this code: // 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(); Replace it with this // 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(); Thanks this work for me n.n Link to comment Share on other sites More sharing options...
mxyzplk Posted November 8, 2010 Share Posted November 8, 2010 Thank you so much :* Link to comment Share on other sites More sharing options...
kja03 Posted September 29, 2011 Share Posted September 29, 2011 Thank you guntersammet for the fix - worked for me which then caused another error but I found the answer. I was getting an error saying the the member function buildblocks() was a non-object. Find the fix HERE - if it is the same one I was experiencing. Link to comment Share on other sites More sharing options...
Guest Posted November 10, 2011 Share Posted November 10, 2011 Thankyou thankyou and thankyou thought I had to start all over .... got more grey hairs by the minute I did.. Link to comment Share on other sites More sharing options...
Netcaster Posted July 3, 2012 Share Posted July 3, 2012 I did the original fix on this thread and am getting another error. Fatal error: Call to a member function restart_capture() on a non-object in /home/user/public_html/products/includes/header.php on line 14 edit: This is after installing Header Tags SEO 3.1.8. Thanks Link to comment Share on other sites More sharing options...
Netcaster Posted July 3, 2012 Share Posted July 3, 2012 I did the original fix on this thread and am getting another error. Fatal error: Call to a member function restart_capture() on a non-object in /home/user/public_html/products/includes/header.php on line 14 edit: This is after installing Header Tags SEO 3.1.8. Thanks Hey there fellers! It's fixed. Forgot to add a line of code at the bottom of app top. Seems I'm so smart, I don't even have to think before I speak. Gotta mind like uh Swiss kernometer. Know what I mean Bubba? LOL Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.