Zen Cart Logo
Forums / General Questions / Session ID's and the Admin

Session ID's and the Admin

Views: 752

Results 1 to 4 of 4
8 Jun 2011, 8:59 AM
#1
worthy avatar

worthy

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

Session ID's and the Admin

I recently moved a ZenCart database from a shared database hosting environment to what is essentially a database VPS server with dedicated RAM. The move was quick and simple. I simply dumped the DB and then restored it on the new database server. All was well, for the visitors that is.

After the move I could not log into the admin. I've read what feels like 100's of posts on session ID's and the only thing that allowed me to log back into the admin was by setting the /admin/includes/configure.php store_sessions setting to not use the DB.

('STORE_SESSIONS', '');

I've tried everything else I've read about for fixing session issues and no matter what I try I can't log into the admin if I change that back to using the DB to store the session. I would really like to figure this out because I want to load balance this site but I can't without it storing the sessions in the DB.

Anybody have any idea's?

Thanks!

8 Jun 2011, 9:35 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Session ID's and the Admin

First thing I'd do is read the tutorial on the proper way to move between servers, and take care of the steps you missed: https://www.zen-cart.com/tutorials/index.php?article=100

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 Jun 2011, 8:49 AM
#3
worthy avatar

worthy

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

Re: Session ID's and the Admin

I did as suggested and moved through the moving server steps at the link provided. I installed a fresh copy of 1.3.8a (what the live site runs on) and was meticulous in the setup. There were no warnings or errors on my server setup, everything in the list was green and I read through each one. Installed the demo store data as recommended. Front end works like a champ. But I can't log into the admin!

So I followed every step over at https://www.zen-cart.com/tutorials/index.php?article=84 but nothing works. Finally I changed the setting in admin/includes/configure.php to not use the DB for sessions storage as on the live database.

After that I could log into the admin after clearing cookies. That isn't a potential fix for me as explained in the first post.

MySQL version = 5.0.87 with UTF-8 charset

I've tried changing to innoDB on the sessions table in the database as I read somewhere, but it has no effect. Its apparent that this is a server environment issue. Is there some incompatibility with certain MySQL or PHP versions?

I do have one warning in phpMyAdmin which is as follows:
Your PHP MySQL library version 5.0.87 differs from your MySQL server version 5.1.55. This may cause unpredictable behavior.

Thanks for all the help.

11 Jun 2011, 9:12 AM
#4
worthy avatar

worthy

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

Re: Session ID's and the Admin

Here is the URL to the demo store I set up. http://moving-proline.hahj.stackablehost.com/ The weird thing is that I did NOT change the sessions setting to use file storage in the main site configuration, so its using the DB storage there.