Zen Cart Logo
Forums / Upgrading to 1.5.x / Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

Views: 2,822

Results 1 to 10 of 10
03 Apr 2024, 02:07
#1
kias_henry avatar

kias_henry

New Zenner

Join Date:
Jun 2015
Posts:
9
Plugin Contributions:
0

Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

Hi folks,

I've been trying for a few days now to try get this working with no success. I upgraded from v1.5.6c to v1.5.8a using zc_install after creating a new database and importing the old database tables to it one by one. I ran the upgrade option in zc install and it said it successfully upgraded from 1.5.6c to 1.5.7. But to get the next upgrade to work, I had to check error logs and in new database (for the new zencart) I kept getting an error in tables about there being no default set for certain variables. I set to null and the upgrade was able to continue?

I fixed the first one or two, and then the upgrade to latest version completed with a tick. Unfortunately when visiting the admin login, and knowing the right password, it just loops back to the admin login page?

I've tried resetting the password numerous times, both through the login page and manually in phpmyadmin..neither works...If I type the wrong password it lets me know.

I noticed after a softilicious install last week that the new database has a different collation of utf8mb4_general_ci rather than the original database i use for zencart which is latin1_swedish_ci. I'm not sure if that is the issue, but I changed my new database I made for upgrade to uft8mb4_general_ci as well hoping this would fix the issue. It hasn't. The issue was persistent before that collation change.

It feels like something to do with sessions (Its PHP 7.4) as when I logged in to a user account in the new shop, it then allowed me in to the admin area a few times before locking me out again. I'm not sure what that is about. Any help appreciated!

Heres the /shop3/myadmin/includes/configure.php file:

<?php /** * @copyright Copyright 2003-2022 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * File Built by Zen Cart Installer on Tue Apr 02 2024 13:01:26 */ define('DIR_WS_ADMIN', '/shop3/myadmin/'); define('DIR_WS_HTTPS_ADMIN', '/shop3/myadmin/'); define('HTTP_CATALOG_SERVER', 'https://<webaddressforshop>com.au/shop3/'); define('HTTPS_CATALOG_SERVER', 'https://<webaddressforshop>.com.au/shop3'); define('ENABLE_SSL_CATALOG', 'true'); define('DIR_WS_CATALOG', '/shop3/'); define('DIR_WS_HTTPS_CATALOG', '/shop3/'); define('DIR_FS_CATALOG', '/home/vp/public_html/shop3/'); define('DB_TYPE', 'mysql'); // always 'mysql' define('DB_PREFIX', 'zen_'); // prefix for database table names -- preferred to be left empty define('DB_CHARSET', 'utf8mb4'); // 'utf8mb4' or older 'utf8' / 'latin1' are most common define('DB_SERVER', 'localhost'); // address of your db server define('DB_SERVER_USERNAME', '<i put username here>'); define('DB_SERVER_PASSWORD', '<and password>'); define('DB_DATABASE', 'vp_zen3'); define('SQL_CACHE_METHOD', 'none'); define('SESSION_STORAGE', 'reserved for future use'); define('SESSION_WRITE_DIRECTORY', '/var/cpanel/php/sessions/ea-php56'); define('SESSION_COOKIE_PATH', '/shop3/myadmin'); ?>

Here is my php.ini file:

allow_url_fopen = Off
allow_url_include = Off
asp_tags = Off
display_errors = On
enable_dl = On
file_uploads = On
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 32M
post_max_size = 8M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php56"
upload_max_filesize = 2M
zlib.output_compression = Off
extension=mysqli.so

03 Apr 2024, 02:23
#2
kias_henry avatar

kias_henry

New Zenner

Join Date:
Jun 2015
Posts:
9
Plugin Contributions:
0

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

Note I did not use softilicious on this occasion, I extracted the zencart files and used the zc_install directory

03 Apr 2024, 08:00
#3
ntestinfo11 avatar

ntestinfo11

New Zenner

Join Date:
Mar 2011
Posts:
39
Plugin Contributions:
0

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

set your php to v8

03 Apr 2024, 09:35
#4
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,278
Plugin Contributions:
37

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

ntestinfo11:

set your php to v8

Most likely need 7.4 based on experiences with plugins & templates & such for 1.5.8a. (https://docs.zen-cart.com/user/first_steps/server_requirements/)

03 Apr 2024, 10:36
#5
swguy avatar

swguy

Administrator

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

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

This is wrong:

define('HTTP_CATALOG_SERVER', 'https://<webaddressforshop>com.au/shop3/');
define('HTTPS_CATALOG_SERVER', 'https://<webaddressforshop>.com.au/shop3');

You want instead:

define('HTTP_CATALOG_SERVER', 'https://<webaddressforshop>com.au');
define('HTTPS_CATALOG_SERVER', 'https://<webaddressforshop>.com.au');

03 Apr 2024, 12:34
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

This doesn't look right, either. Those statements aren't part of a 'standard' admin configure.php file. I'd remove them or comment them out.

define('SESSION_WRITE_DIRECTORY', '/var/cpanel/php/sessions/ea-php56');
define('SESSION_COOKIE_PATH', '/shop3/myadmin');

04 Apr 2024, 00:49
#7
kias_henry avatar

kias_henry

New Zenner

Join Date:
Jun 2015
Posts:
9
Plugin Contributions:
0

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

"This is wrong:

define('HTTP_CATALOG_SERVER', 'https://<webaddressforshop>com.au/shop3/');
define('HTTPS_CATALOG_SERVER', 'https://<webaddressforshop>.com.au/shop3');

You want instead:

define('HTTP_CATALOG_SERVER', 'https://<webaddressforshop>com.au');
define('HTTPS_CATALOG_SERVER', 'https://<webaddressforshop>.com.au'); "

^ I made these changes, I also tried changing to PHP 8 but this did not work to fix the issue. I'm not getting any errors or anything. It would be a real shame to have to try reinstall it all again, my internet connection is too slow to upload the database files in one hit ;(

04 Apr 2024, 15:16
#8
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

Are you simply missing a dot "."
define('HTTP_CATALOG_SERVER', 'https://<webaddressforshop>com.au');
should be
define('HTTP_CATALOG_SERVER', 'https://<webaddressforshop>.com.au');

07 Apr 2024, 02:34
#9
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
284
Plugin Contributions:
1

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

Also, these two lines -

define('DIR_WS_ADMIN', '/shop3/myadmin/');
define('DIR_WS_HTTPS_ADMIN', '/shop3/myadmin/');

shouldn't be required in 158. try removing in case they're causing an issue.

07 Apr 2024, 11:40
#10
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade

I think your problem started here:

I upgraded from v1.5.6c to v1.5.8a using zc_install ** after creating a new database and importing the old database tables to it one by one.** I ran the upgrade option in zc install and it said it successfully upgraded from 1.5.6c to 1.5.7. But to get the next upgrade to work, I had to check error logs and in new database (for the new zencart) I kept getting an error in tables about there being no default set for certain variables. I set to null and the upgrade was able to continue?

I'm guessing that however you did that initial importing failed to create various "keys" in the database and, apparently, various fields' defaults. When you checked those error logs, what did they indicate as a cause of the error?

Does your webhost not provide access to a cPanel with database tools like phpMyAdmin? You should have, IMO, created a new database containing a backup of the 1.5.6c version and then run zc_install against the current 1.5.6c database.

See the Zen Cart docs for additional information: https://docs.zen-cart.com/user/upgrading/detailed_upgrading/