Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Urgent! snapshot error


gruntstyle

Recommended Posts

Posted

Help. I am now getting this fatal error every time I try to click on any account or checkout function:

 

Fatal error: Call to a member function set_snapshot() on a non-object in /home/gruntsty/public_html/account.php on line 16

 

Here is a copy of lines 1-23 on account.php

 

<?php

/*

$Id: account.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

?>

 

 

Help please.

 

I tried looking at other posts. Those methods didn't seem to help. I tried using some of my backup files, and those aren't helping either.

This is my signature.

Posted

I've encountered this problem before, when I was logging in to different copies of my store from different tabs in the same browser. The osCommerce session info got out of sync with reality, and there was no $navigation object in the session, so it crashed.

 

This will fix itself over time, once the sessions time out.

 

I was also able to fix this by removing entries from the "sessions" database table. This is not, however, something you should do with a live system, as it will negatively impact customers who are using the store.

Check out Chad's News.

Posted

NOTE: PLEASE IGNORE MY PREVIOUS POST. IT IS INCORRECT. HERE IS THE CORRECT VERSION:

 

I've encountered this problem before. It was when I copied the MySQL database to a test store. The "sessions" table was out of sync and had to be emptied. (There was no $navigation object in the session, so it crashed.)

 

This will fix itself over time, once the sessions time out.

 

You can also fix this by emptying the "sessions" table, but don't do that on a live system.

Check out Chad's News.

Posted

NOTE: PLEASE IGNORE MY PREVIOUS POST. IT IS INCORRECT. HERE IS THE CORRECT VERSION:

 

I've encountered this problem before. It was when I copied the MySQL database to a test store. The "sessions" table was out of sync and had to be emptied. (There was no $navigation object in the session, so it crashed.)

 

This will fix itself over time, once the sessions time out.

 

You can also fix this by emptying the "sessions" table, but don't do that on a live system.

 

Wow. it did just fix it self over time. I'm not entirely sure why. Thanks for your help. How do I prevent this from happening again? You said by emptying the 'sessions' table. I'm not sure I understand what that means.

This is my signature.

Posted
You said by emptying the 'sessions' table. I'm not sure I understand what that means.

It means removing data from the "sessions" table in the MySQL database. Don't do this to a live system being used by customers! It will log them out and may cause other problems.

Check out Chad's News.

Posted

It means removing data from the "sessions" table in the MySQL database. Don't do this to a live system being used by customers! It will log them out and may cause other problems.

 

 

I think I understand. So if I make changes to pages such as, account, they will change the sessions table and need to time out before I make the system live..

This is my signature.

Posted

I think I understand. So if I make changes to pages such as, account, they will change the sessions table and need to time out before I make the system live..

I'm not sure that's correct. The sessions table stores certain global variables between page requests, so that their values are available as the user browses through the various pages of the store. Variables containing login information, the shopping cart, etc. Under normal circumstances, you shouldn't run into an issue with the session data.

 

I've only seen this problem when I copied the osCommerce MySQL database from the live production system to a test database for a test system.

Check out Chad's News.

Archived

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

×
×
  • Create New...