If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 1.5.x / Upgrade Completes BUT

Upgrade Completes BUT

Started by dbltoe on 15 Jul 2023, 6:32 PM · Views: 4,256

Results 1 to 20 of 23
15 Jul 2023, 6:32 PM
#1
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Upgrade Completes BUT

Upgraded 1.5.1 to 1.5.8 by installing a bare 1.5.8 and replacing the DB with that of the old 1.5.1. zc_install gave database upgrade option.

Using that reported thee upgrade as successful and completed to remove zc_install message.

I am able to see the storefront and all products are present. (imamges not copied over yet)

When I try to log in to the admin, I continually get:

[15-Jul-2023 17:39:05 UTC] Request URI: /ADMIN/index.php?cmd=login&camefrom=index.php, IP address: 123.345.567.789, Language id 1#1  trigger_error() called at [/home/*****/*****/includes/classes/db/mysql/query_factory.php:703]
#2  queryFactory->show_error() called at [/home/*****/*****/includes/classes/db/mysql/query_factory.php:648]
#3  queryFactory->set_error() called at [/home/*****/*****/includes/classes/db/mysql/query_factory.php:289]
#4  queryFactory->Execute() called at [/home/*****/*****/ADMIN/includes/functions/admin_access.php:272]
#5  zen_read_user() called at [/home/*****/*****/ADMIN/includes/functions/admin_access.php:290]
#6  zen_validate_user_login() called at [/home/*****/*****/ADMIN/login.php:34]
#7  require(/home/*****/*****/ADMIN/login.php) called at [/home/*****/*****/ADMIN/index.php:11]
--> PHP Fatal error: MySQL error 1054: Unknown column 'admin_profile' in 'field list' :: SELECT admin_id, admin_name, admin_email, admin_pass, pwd_last_change_date, reset_token, failed_logins, lockout_expires, admin_profile
            FROM admin WHERE admin_name = 'jeandert'  LIMIT 1 ==> (as called by) /home/*****/*****/ADMIN/includes/functions/admin_access.php on line 272 <== in /home/*****/*****/includes/classes/db/mysql/query_factory.php on line 703.

The admin_profile column DOES exist but nothing I do seems to make the system want to accept it.

Thoughts?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

15 Jul 2023, 11:57 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Upgrade Completes BUT

First thing that comes to mind is whether it's pointed at the correct database, in the admin configure.php

.
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.

16 Jul 2023, 12:09 AM
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

Store

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'soycnanc_marjac');
define('DB_SERVER_PASSWORD', 'Bm1e_}#R');
define('DB_DATABASE', 'soycnanc_151');
```admin

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_CHARSET', 'utf8');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'soycnanc_marjac');
define('DB_SERVER_PASSWORD', 'Bm1e_}#R');
define('DB_DATABASE', 'soycnanc_151');

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 12:14 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

And the screen says...

WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 12:19 AM
#5
lat9 avatar

lat9

Administrator

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

Re: Upgrade Completes BUT

Is there a configure.php file in admin/includes/local/?

16 Jul 2023, 9:16 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrade Completes BUT

dbltoe:

And the screen says...

As you probably know, this is expected based on the debug log identifying an error. What lat9 identified seems to be a possibility though even with starting with a 1.5.1 database, that field already existed. Only thing that really makes sense is that the database referenced doesn't have a the admin that is even that recent.

Provided data about the current system configure files, what about the original store? What db_prefix did it have?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Jul 2023, 10:38 AM
#7
swguy avatar

swguy

Administrator

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

Re: Upgrade Completes BUT

Go to phpmyadmin, select database soycnanc_151, go to table admin and click structure to view the schema. Post a screenshot of the schema.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

16 Jul 2023, 12:29 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

Covid twice was way easier than this!
The original structure had admin_level as you can see in the image.
After bringing it over and getting all the files up to really 1.5.1, the DB upgrade added fields to the admin table but left the admin_level field.:dontgetit

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 12:31 PM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

lat9:

Is there a configure.php file in admin/includes/local/?
Nothing in any of my tries but skip_version_check.inoi

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 12:49 PM
#10
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

To add further info,
brought over the files

files had four sub or sub-sub folders named public_html:shocking:

finally found correct root/admin and added them to the new site

brought over DB dump from old site.

had to load 5.3 to get anything to work. 5.3 gave timezone error and that was set

loaded files and database from old site and tried to run on our server. Admin would not let us in even after sending new password. Kept getting the "incorrect password" notice.

pulled down fresh 1.5.1 and went file by file to ensure the site was all 1.5.1 (found many 1.3.9 and 1.5.0 files in existance)

after that, we could get the storefront with products and images but still no joy on the admin.

used zc_install and it did have the DB upgrade option. Ran that, got success notice, still couldn't get into admin (all times/tries showed that version's admin login screen

All zc_install operations at 1.5.1 reported a curl error if that makes any difference

created a 1.5.5 test site and imported the DB. Upgrade reported succes but still no access to the admin although passwords created did not report "incocrrect password" We got a 500 and a PHP parse error unexpected 'if' (T_IF) in /home/USER/public_html/ADMIN/login.php on line 22

19.5 years at this. You'd think I could at least stumble on a fix:(

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 1:11 PM
#11
swguy avatar

swguy

Administrator

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

Re: Upgrade Completes BUT

After bringing it over and getting all the files up to really 1.5.1, the DB upgrade added fields to the admin table but left the admin_level field.

You were missing admin_profile not admin_level. And this screenshot shows you are still missing admin_profile.

I can't follow the number of things you're doing ("getting all the files up to really 1.5.1"??? Huh?)
Can we just go back to the 1.5.8 update and try to get that going?

Was this a screenshot of your 1.5.8 tables? Or something else?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

16 Jul 2023, 1:32 PM
#12
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

swguy:

I can't follow the number of things you're doing ("getting all the files up to really 1.5.1"??? Huh?)
Can we just go back to the 1.5.8 update and try to get that going?

Old files had 1.3.9, 1.5.0, and 1.5.1

Screenshot of 1.5.8

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 3:06 PM
#13
lat9 avatar

lat9

Administrator

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

Re: Upgrade Completes BUT

The zc_install process creates a couple of progress type logs and, if something amiss is found, possibly other 'error' type logs.

Please post the contents of the zcInstall*.log files present.

16 Jul 2023, 3:19 PM
#14
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

[15-Jul-2023 18:09:09 UTC] PHP Fatal error:  1171:All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead :: CREATE TABLE counter_history ( startdate char(8) default NULL, counter int(12) default NULL, session_counter int(12) default NULL, PRIMARY KEY  (startdate) ) ENGINE=MyISAM COLLATE utf8_general_ci; in /home/soycnanc/_test151/includes/classes/db/mysql/query_factory.php on line 120
[15-Jul-2023 18:10:27 UTC] PHP Fatal error:  1171:All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead :: CREATE TABLE counter_history ( startdate char(8) default NULL, counter int(12) default NULL, session_counter int(12) default NULL, PRIMARY KEY  (startdate) ) ENGINE=MyISAM COLLATE utf8_general_ci; in /home/soycnanc/_test151/includes/classes/db/mysql/query_factory.php on line 120
---------------
Jul 15 2023 18:05 -- inspectCURL problems detected:  0 => ---------------Jul 15 2023 18:06 -- inspectCURL problems detected:  0 => ---------------Jul 15 2023 18:07 -- inspectCURL problems detected:  0 => ---------------Jul 15 2023 18:07 -- inspectCURL problems detected:  0 => ---------------Jul 15 2023 18:07 -- inspectCURL problems detected:  0 => ---------------Jul 15 2023 18:09 -- inspectCURL problems detected:  0 => ---------------Jul 15 2023 18:09 -- inspectCURL problems detected:  0 => 
``` but I get

===
root@host public_html]# /usr/local/bin/ea-php53 -i|grep -i curl | grep enabled
cURL support => enabled
[root@host public_html]#
===

the other is huge and mostly complains about curl but I do notice it saying the MySQL Support is OFF.  ??

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 3:23 PM
#15
lat9 avatar

lat9

Administrator

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

Re: Upgrade Completes BUT

Export a gzipped copy of the ***original ***database and send it to my direct email address. I'll see if I can see what's going on.

16 Jul 2023, 5:30 PM
#16
lat9 avatar

lat9

Administrator

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

Re: Upgrade Completes BUT

dbltoe:

Store

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'soycnanc_marjac');
define('DB_SERVER_PASSWORD', 'Bm1e_}#R');
define('DB_DATABASE', 'soycnanc_151');

> ```
// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', '');
  define('DB_CHARSET', 'utf8');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'soycnanc_marjac');
  define('DB_SERVER_PASSWORD', 'Bm1e_}#R');
  define('DB_DATABASE', 'soycnanc_151');

Er, the database export that you provided via direct email uses a DB_PREFIX of zen_ ... that could easily be the underlying issue.

16 Jul 2023, 5:31 PM
#17
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

That's from a different try where I used phpmyadmin to remove the prefix

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 5:46 PM
#18
lat9 avatar

lat9

Administrator

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

Re: Upgrade Completes BUT

Using the as-sent database (with a zen_ DB_PREFIX), setting that constant to reflect that fact in both the admin and storefront configuration files yielded a successful upgrade from 1.3.9h to 1.5.8a and I was able to log into the admin after renaming zc_install.

16 Jul 2023, 5:49 PM
#19
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Upgrade Completes BUT

were you using the lastest githhub or distro?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Jul 2023, 5:50 PM
#20
lat9 avatar

lat9

Administrator

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

Re: Upgrade Completes BUT

What version of PHP is in use?