Zen Cart Logo
Forums / Basic Configuration / Admin not available after server move

Admin not available after server move

Views: 1,517

Results 1 to 5 of 5
28 Apr 2021, 4:34 AM
#1
mtate007 avatar

mtate007

New Zenner

Join Date:
Dec 2020
Location:
Colorado
Posts:
11
Plugin Contributions:
0

Admin not available after server move

My site was running fine using 1.5.7. My shared hosting company moved my site to a new server. I changed the define('DIR_FS_CATALOG' in both includes and admin/includes. The public side of my site seems to be working fine. When I try to login to the admin section the login screen comes up but there is a message below it that says.....

WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I can't login anymore. I tried resetting the password and it gives me the same error as above. I have checked the permissions on the files and folders and they seem to be ok. I searched for the error message in the forums and found nothing. Does anyone have any ideas what I can check?

Thanks!

28 Apr 2021, 5:14 AM
#2
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Admin not available after server move

WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
That is a database error, look in the logs for mydebug logs for the admin. Possibly run a repair on the database in phpmyadmin. also compare db settings in the configure.php files to make sure what is working for the catalog side is the same in the admin configure.php

28 Apr 2021, 5:56 AM
#3
mtate007 avatar

mtate007

New Zenner

Join Date:
Dec 2020
Location:
Colorado
Posts:
11
Plugin Contributions:
0

Re: Admin not available after server move

In the admin debug logs I am seeing the following

#1 session_write_close()
--> PHP Warning: session_write_close(): Cannot call session save handler in a recursive manner in Unknown on line 0.

#1 session_write_close()
--> PHP Warning: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /tmp) in Unknown on line 0.

#1 trigger_error() called at [/home2/username/public_html/includes/classes/db/mysql/query_factory.php:170]
#2 queryFactory->show_error() called at [/home2/username/public_html/includes/classes/db/mysql/query_factory.php:142]
#3 queryFactory->set_error() called at [/home2/username/public_html/includes/classes/db/mysql/query_factory.php:269]
#4 queryFactory->Execute() called at [/home2/username/public_html/includes/functions/sessions.php:77]
#5 _sess_write()
#6 session_write_close() called at [/home2/username/public_html/adminfoldername/includes/functions/general.php:18]
#7 zen_redirect() called at [/home2/username/public_html/adminfoldername/includes/init_includes/init_sessions.php:60]
#8 require_once(/home2/username/public_html/adminfoldername/includes/init_includes/init_sessions.php) called at [/home2/username/public_html/includes/autoload_func.php:37]
#9 require(/home2/username/public_html/includes/autoload_func.php) called at [/home2/username/public_html/adminfoldername/includes/application_top.php:37]
#10 require(/home2/username/public_html/adminfoldername/includes/application_top.php) called at [/home2/username/public_html/adminfoldername/login.php:8]
#11 require(/home2/username/public_html/adminfoldername/login.php) called at [/home2/username/public_html/adminfoldername/index.php:11]
--> PHP Fatal error: 1264:Out of range value for column 'expiry' at row 1 :: insert into sessions (sesskey, expiry, value)
values ('1ff7205995686dca374bfeb48a5f8968', 10619587604, 'c2VjdXJpdHlUb2tlbnxzOjMyOiI4YTFmMDFiNDFmNjE5ZjMxMjYzNzVkNzNjYTMzZWM1MyI7')
ON DUPLICATE KEY UPDATE value='c2VjdXJpdHlUb2tlbnxzOjMyOiI4YTFmMDFiNDFmNjE5ZjMxMjYzNzVkNzNjYTMzZWM1MyI7', expiry=10619587604 ==> (as called by) /home2/username/public_html/includes/functions/sessions.php on line 77 <== in /home2/username/public_html/includes/classes/db/mysql/query_factory.php on line 170.

I did a check and repair on the database. All o.k. And yes, I did change the names on the folder paths to hide my username and real admin folder name. Also, I can login and out as a user on the storefront side.

28 Apr 2021, 9:39 AM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,708
Plugin Contributions:
56

Re: Admin not available after server move

By chance did you bump up the admin timeout? Because this says your session should last several centuries.

Check Admin > Configuration > My Store > Admin Session Time Out in Seconds to see if it's a crazy huge value.

Oops you can't do this because your admin is down. Check it in phpMyAdmin.

SELECT configuration_value FROM configuration WHERE configuration_key = 'SESSION_TIMEOUT_ADMIN';

29 Apr 2021, 2:08 AM
#5
mtate007 avatar

mtate007

New Zenner

Join Date:
Dec 2020
Location:
Colorado
Posts:
11
Plugin Contributions:
0

Re: Admin not available after server move

swguy,

You hit the nail on the head! Took 2 minutes to run your fix and BAM! Thanks a lot man you are a rock star!