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
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
Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade
Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade
Quote:
Originally Posted by
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..._requirements/)
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');
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');
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 ;(
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');
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.
Re: Upgrade from v1.5.6c to v1.5.8a issue with admin login after database upgrade
I think your problem started here:
Quote:
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/upgra...led_upgrading/