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 thinks my ZC version is 1.54

Upgrade thinks my ZC version is 1.54

Started by cheddars on 4 Sep 2023, 7:10 PM · Views: 1,750

Results 1 to 5 of 5
4 Sep 2023, 7:10 PM
#1
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Upgrade thinks my ZC version is 1.54

I am upgrading Zen Cart from version 1.55f to ver 1.56c but on the database upgrade screen I get the message "Could not update to version 1.5.6. We detect that you currently have v1.5.4, and must perform the updates to get to version 1.5.5 first." and upgrade will not complete.
The project version fields in the database show 5.5f for zencart main and 5.5 for Zen cart database. I have not included any plugins although there are plugin tables in the database.
I am using PHP ver 7.0.33
Thank you

4 Sep 2023, 7:41 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Upgrade thinks my ZC version is 1.54

Two questions:

Why are you using a horridly out of date PHP?

Why update to any version other than the current one? https://github.com/zencart/zencart/releases

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

4 Sep 2023, 8:23 PM
#3
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: Upgrade thinks my ZC version is 1.54

dbltoe:

Two questions:

Why are you using a horridly out of date PHP?

Why update to any version other than the current one? https://github.com/zencart/zencart/releases

Thank you dbltoe
I am aware of the latest versions and have unsuccessfully attempted to upgrade to ZC158a and PHP 8.0 from zc 155f and PHP 7.0
For me, as a very occasional programmer, there is a lot involved. I have upgraded from ZC139 in the past but I'm up against it here. Not only Zencart and PHP upgrades but especially the language upgrades in ver zc157 as I have a number of plugins.
Hence I am doing it a version at a time and I have been met with this problem at the first hurdle.
Are you able to help please?

4 Sep 2023, 8:49 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Upgrade thinks my ZC version is 1.54

You may be making it harder on yourself than you think.

Install the latest version in a test environment, replace the db with the old, upgrade and repair what needs fixing. You are going to find a lot of the mods are no longer viable. Those that really helped the most may already be a part of the newer version. https://myzencarthost.com/index.php?rp=/knowledgebase/1/Creating-a-Test-Site-with-cPanel.html

I know of no one who has a test environment set up with the versions of ZC and PHP you are trying to use. Without something to compare, helping becomes one big WAG.

And, your situation only worsens with every day you try to hang on to the past.

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

4 Sep 2023, 9:01 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Upgrade thinks my ZC version is 1.54

cheddars:

must perform the updates to get to version 1.5.5 first

In upgrades, several database changes get made. The upgrader inspects a couple of those to see whether it is reasonable to believe that all of those changes were done. If for some reason you (or some plugin) have changed those particular things that are used as checkpoints, the checks will fail.

In the case of v1.5.5 the following are what is inspected:

  1. The configuration table is checked for a field whose configuration_key is CC_ENABLED_DEBIT and whose name is 'Credit Card Enable Status - Debit'

  2. The admin table is checked to be sure there is a field named reset_token whose type is VARCHAR(255).

  3. The coupons_description table is checked to be sure that the coupon_name field is of type 'VARCHAR(64)'

  4. The configuration table is checked whether CURRENCY_SERVER_PRIMARY is present and described as 'Currency Exchange Rate: Primary Source'

The most common cause of problems here is either changing the length of those VARCHAR fields (like, did you change the coupon_name field to be longer for some reason?), or rewording the description of those configuration keys.

After you've figured out what's inconsistent, you can fix those things and then continue on with your upgrade.

Note: If you changed varchar(64) to something longer, then if you change it back to 64 then whatever extra text you'd had in existing records will be chopped down to max 64 characters. If that's gonna be a problem in your situation, you could trick the installer/upgrader into accepting your changes by manually altering /zc_install/includes/systemChecks.yml in the section that begins with "checkDBVersion155". Just beware that anytime you take off or alter the safety guards, you could get undesired side effects. (I always hated pinching my pantleg in the bicycle chain guard ... until one day I took the guard off and then my pantleg got wrapped into the chain and yanked me off the bicycle. I should have just stopped wearing bell-bottoms and left the guard alone! :D )

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