Forums / Upgrading to 1.5.x / Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

Views: 10,468

Results 21 to 40 of 52
4 Feb 2015, 6:25 AM
#21
nuganics avatar

nuganics

New Zenner

Join Date:
Dec 2008
Posts:
65
Plugin Contributions:
0

Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

I was going insane also.

What I did next was install a fresh copy of 1.5.3 in a sub-folder and then upload zc_install from 1.5.4 to the sub folder and try the upgrade. This way you find out is it your shop or something wrong with your server setup.

If still bad try http://www.zen-cart.com/showthread.php?215814-Database-Upgrade-Not-Accepting-Password-1-5-3-to-1-5-4&p=1270834#post1270834 . I did a fresh install of 1.5.3 in a sub folder and another fresh install of 1.5.4 in another sub-folder and then just changed the 1.5.4 configuration files to point to the 1.5.3 database if you don't want to use your real store. Grabbed the hashes in phpmyadmin and run upgrade to get hashes again.

4 Feb 2015, 7:14 AM
#22
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

When you look at the admin table in the database, what does the password field contain? I'm interested in just the first 10 characters, as well as the total number of characters. Also, what was the "old but still commonly found" version of PHP you were using?

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

4 Feb 2015, 4:19 PM
#23
rnoack avatar

rnoack

New Zenner

Join Date:
May 2010
Posts:
7
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

DrByte:

When you look at the admin table in the database, what does the password field contain? I'm interested in just the first 10 characters, as well as the total number of characters. Also, what was the "old but still commonly found" version of PHP you were using?

The zc_install was freshly uploaded from the 1.5.4 zip.

First ten characters: 50fb761877
total character count: 129

older version was php 5.2 fastcgi , not sure the exact revision unless i switch back and run php info.
now i'm using php 5.4 fastcgi.

I didn't try the thing which Edit /includes/classes/class.zcPassword.php ~line 49 yet, so I will check this later, at my real job now so I can't edit that at the moment.

I will also attempt the uploading a new 1.5.3 thing after if that doesn't solve it, but I'm confused why this would really make a difference if the zc_install folder is the same from 1.5.4.

5 Feb 2015, 7:35 AM
#24
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

rnoack:

First ten characters: 50fb761877
total character count: 129
That suggests that the password format has not been updated to the new format yet.
I'd be interested in knowing whether that password hash is identical in the "old" database.

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

5 Feb 2015, 6:49 PM
#25
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

A few more questions:

  1. What was your "old" version of Zen Cart that you were upgrading from? ... when you were on PHP 5.2
  2. What's the field-length in the database for that password field? Is it 255?
  3. Thanks for the first 10 characters. ... Can you give the last 10 as well?

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

6 Feb 2015, 12:04 AM
#26
rnoack avatar

rnoack

New Zenner

Join Date:
May 2010
Posts:
7
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

DrByte:

A few more questions:

  1. What was your "old" version of Zen Cart that you were upgrading from? ... when you were on PHP 5.2
  2. What's the field-length in the database for that password field? Is it 255?
  3. Thanks for the first 10 characters. ... Can you give the last 10 as well?

Ok, thanks to your comment "That suggests that the password format has not been updated to the new format yet." I was able to quickly solve the problem. After all, how on earth could the password have possibly been updated to the new format when the only thing that a zencart upgrade is it to upload and replace some files?

All I had to do to fix the problem was go into the admin area and change my admin password, then it was saved in the "new format", and the zc_install db upgrade worked.

But, this clearly means that the upgrade steps are wrong since changing the admin password before running the DB upgrade is not included in them.

6 Feb 2015, 12:43 AM
#27
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

rnoack:

But, this clearly means that the upgrade steps are wrong since changing the admin password before running the DB upgrade is not included in them.I've never had to change the password before doing the zc_install upgrade step.

If I can find an exact combination of steps that can consistently recreate the symptoms you describe, then I'll be happy to have the upgrade instructions adjusted to suit.

I'm glad it's now working for you!

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

6 Feb 2015, 3:01 AM
#28
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

DrByte:

I've never had to change the password before doing the zc_install upgrade step.

If I can find an exact combination of steps that can consistently recreate the symptoms you describe, then I'll be happy to have the upgrade instructions adjusted to suit.

I'm glad it's now working for you!

Personally, I don't think that the instructions would need changing as part of existing instruction identifies if unable to login that one should use the "forgotten/lost" password instruction. I've had to do that for some upgrade or another, but the conditions did not seem anamalous or a fault of default zc code/database.

Just my 2 cents worth.

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

6 Feb 2015, 3:23 AM
#29
rnoack avatar

rnoack

New Zenner

Join Date:
May 2010
Posts:
7
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

mc12345678:

Personally, I don't think that the instructions would need changing as part of existing instruction identifies if unable to login that one should use the "forgotten/lost" password instruction. I've had to do that for some upgrade or another, but the conditions did not seem anamalous or a fault of default zc code/database.

Just my 2 cents worth.

The issue is that I was able to log in just fine in the admin panel, it didn't seem to care about the password being in 1.5.3 format, but the code for doing the DB upgrade script was only accepting passwords in 1.5.4 format. I don't know when the password would have magically upgraded by itself to 1.5.4 format since I was on 1.5.4 and just FTPd some files over. If anything, the DB upgrade script would be the one updating the password I would think, or the admin panel itself would force an update when you log in, I don't know how it gets in the new format, other than changing the password... so that's why I'm saying it seems like it would be a required step. If the db update needs the new format, you must first perform some action which changes to the new format. That could be "reset/forgot password", but it's a bit confusing why the admin screen accepts the old PW just fine but the db upgrade does not.

6 Feb 2015, 3:53 AM
#30
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

rnoack:

it's a bit confusing why the admin screen accepts the old PW just fine but the db upgrade does not.
We'll test that theory some more, but we spent several hours earlier today testing numerous variations and couldn't create your symptoms. So, in the absence of a clear description of all steps taken to create the scenario (including when to switch PHP versions, and when to attempt to use admin passwords in zc_install and admin), we're still not finding a confirmable bug. But if there is one, we'd really like to track it down and fix it, or provide clear guidance on how to correctly avoid it from occurring.

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

6 Feb 2015, 4:20 AM
#31
rnoack avatar

rnoack

New Zenner

Join Date:
May 2010
Posts:
7
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

ok, as best that I can remember exactly what i did, these are the exact steps i did:

started on php 5.2 fastcgi , with renamed admin folder

  1. went through the whats changed page in DOCS and uploaded/replaced all these files in my zencart folder on my server
  2. tried to go to admin screen - i forget the order the errors happens in, but i got the t_static error and the blank screen error
  3. went on zencart forum and found patch to change files to work with php 5.2 ( comment before echo @gethostname(); line, change line to $levels = self::$levels; in class.admin.zcObserverLogEventListener )
    -) admin screen seemed to be working now, but had an error message on top about db being out of date. Went back on zencart forum to figure out how to resolve because I had forgotten about the need to run db update from zc_install as for other upgrades recently I just replaced the files and it was fine
  4. uploaded zc_install
  5. went to install page, it started giving me errors about not being able to find files in the /admin folder (because i had it renamed) so i renamed the folder and refreshed the page. also got errors about wrong chmod on both configure.php files so I chmoded both of them to the recommended values.
  6. still getting warning about php version, but ignored it and contined to DB upgrade, tried to do the upgrade, at this point was getting error about the password. tried like 4 more times in a row because I tried copying/typing manually/ etc....
  7. renamed admin folder back to renamed name, went back to the admin page to try to log in, got error about zc_install exiting, renamed the folder, refreshed, tried to log in and it worked.... said "wtf" and renamed zc_install back and admin back to admin then tried db upgrade again with same result.
    -) came to forum and posted....
  8. went into cpanel and found option to upgrade to php 5.4 fastcgi. was very hopeful this would fix the problem.
  9. went back to db upgrade, did not fix the problem...

--- nothing for a day ----

  1. after getting clue from forum about password version format, renamed folders so i could log back into admin, and reset my password to something else
  2. tried db upgrade again and it worked
8 Feb 2015, 7:52 PM
#32
acdguitars avatar

acdguitars

New Zenner

Join Date:
Feb 2015
Location:
Sheffield, UK
Posts:
2
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

I've been on this problem for the last 3 days and ended up on this thread. I'm in exactly the same position, i.e. followed the same procedures as in post #31, except after trying a password reset I still cant update the database and just get the message that the admin password is required to proceed. Before starting the database upgrade all the system inspection checks are OK except for "PHP open_basedir restrictions=". I'm struggling to find how to correct this but this apparently shouldn't affect the upgrade.
So to summarise, I'm upgrading ZenCart (and the database) from 1.5.0 to 1.5.4. I have backed up the existing database, created a new one and imported the old database into the new one. Installed new version of ZenCart just by copying the files to a new directory and then edited the config files to point to this directory and new database files. I can rename the admin directory and zc_install folder and successfully log in to the admin area. I have also requested a password reset from the admin login page and then logged in again and entered a new password. Been round the whole thing a few times now and am just stuck trying to upgrade the database. Help! Please!

8 Feb 2015, 8:07 PM
#33
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

Here's how I upgrade:

  1. Use a supported modern PHP version.
  2. make new folder and database
  3. upload new zen cart files to the folder
  4. run zc_install and choose "Install" (and tell it the same db_prefix as the old site is using), and install demo data. This populates the database and builds the config files.
  5. log in and make sure i can add to cart, and log in to admin. This is all temporary, but confirms the software works with the server configuration.
  6. import the old database into the new. This wipes all the new tables and replaces them with the old data.
    **7. NOTE: I DO NOT LOG INTO THE ADMIN HERE, NOR ACCESS THE STOREFRONT AFTER IMPORTING AND BEFORE UPGRADING.
    **8. run zc_install again, and this time choose "Database Upgrade", ignoring warnings about admin folder or configure.php files being writable.
  7. the upgrade will prompt me for the admin password, which is the password from my old store's admin. I enter that and it proceeds normally.
  8. delete zc_install, and login to admin, test storefront and checkout, etc.
    Done.

Note the NOTE in #7. If you're upgrading from prior to v1.5.2 and do login to the Admin at that stage you will alter the password format. I still don't see why zc_install would have any issue with that new password, but I'm guessing that's what's caused the issue for the folks in this discussion.

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

9 Feb 2015, 3:23 PM
#34
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

IMHO #9 is the main problem in most cases of "won't accept my password." Perhaps the wording in zc_install could better reflect that fact.

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

9 Feb 2015, 4:44 PM
#35
acdguitars avatar

acdguitars

New Zenner

Join Date:
Feb 2015
Location:
Sheffield, UK
Posts:
2
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

Yes DrByte!!!!! It is the #7 step that is causing the problem. I was being ultra methodical and checking the admin username and password still work before I try and upgrade the database, but as you say this changes the password format and then it all gets stuck! All running well now. Coffee time..... ;)

10 Feb 2015, 2:45 AM
#36
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

acdGuitars:

Yes DrByte!!!!! It is the #7 step that is causing the problem. I was being ultra methodical and checking the admin username and password still work before I try and upgrade the database, but as you say this changes the password format and then it all gets stuck! All running well now. Coffee time..... ;)
Woot !

.
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 Feb 2015, 3:55 AM
#37
irishshopper avatar

irishshopper

Zen Follower

Join Date:
Apr 2010
Location:
County Down, Northern Ireland
Posts:
302
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

Having the same password rejected problem upgrading from 1.5.3 to 1.5.4 for https://www.marybeth-jewelry.com.

16 Feb 2015, 4:34 PM
#38
drbyte avatar

drbyte

Sensei

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

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

irishshopper:

Having the same password rejected problem upgrading from 1.5.3 to 1.5.4 for www.marybeth-jewelry.com.
I suspect it's a different problem, unless you're mixing PHP versions.
I've asked a lot of questions about additional details in the posts prior to yours. Please answer those same questions, for your case.

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

8 Mar 2015, 9:53 AM
#39
soundcatcher avatar

soundcatcher

New Zenner

Join Date:
Nov 2010
Location:
Horsham
Posts:
4
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

I just wanted to post a reply in here to hopefully aid with working out what is causing this issue...

I have been battling with this exact same issue for several weeks to no avail.

This morning I tried changing the admin password and re-trying the database upgrade and it worked! :-)

I didn't at any point login to admin or access storefront during the upgrade process from v1.5.3 to v1.5.4

Oh I have been using PHP version 5.5 all the way through.

This is all a bit of a mystery to me as to why it didn't work originally, but this fix worked for me!

8 Mar 2015, 10:29 AM
#40
irishshopper avatar

irishshopper

Zen Follower

Join Date:
Apr 2010
Location:
County Down, Northern Ireland
Posts:
302
Plugin Contributions:
0

Re: Database Upgrade Not Accepting Password 1.5.3-to-1.5.4

We just could not crack it so deleted everything and did a fresh install of V 1.5.4.

We do however have quite a few ZenCarts V1.3.9 we need to upgrade to V1.5.4 and not looking forward to this.

Have discovered an added problem in that V1.5.4 needs PHP V.5.4 but versions 1.3.9 will NOT work with this so upgrading the server to PHP5.4 will knock out all older versions of ZenCart.

The work around is to alter the .htaccess file and add in a php.ini file. All an added complication.

We host with Bluehost but they won't discuss any ZenCart problems with you unless you installed ZenCart using their MOJO software and will not support any installations done manually with FTP upload (we use CoreFTP).

As we take payments by PayPal Express and Nochex we never receive any of our customers payment details ourselves so don't need a Certificate but Bluehost do everything they can to force us to buy one but having over 30 ZenCarts this would add to our costs considerably each year.

They tried putting one of our ZenCarts onto a VPS where we were entitled to a free certificate but we found while we could access the storefront the link to the admin area no longer worked so had to revert back to a shared system.

soundcatcher:

I just wanted to post a reply in here to hopefully aid with working out what is causing this issue...

I have been battling with this exact same issue for several weeks to no avail.

This morning I tried changing the admin password and re-trying the database upgrade and it worked! :-)

I didn't at any point login to admin or access storefront during the upgrade process from v1.5.3 to v1.5.4

Oh I have been using PHP version 5.5 all the way through.

This is all a bit of a mystery to me as to why it didn't work originally, but this fix worked for me!