Zen Cart Logo
Forums / General Questions / Cannot log into admin, reset password does not work and phpMyAdmin fix not working

Cannot log into admin, reset password does not work and phpMyAdmin fix not working

Views: 1,198

Results 1 to 7 of 7
2 Dec 2017, 5:43 PM
#1
webweaver2000 avatar

webweaver2000

New Zenner

Join Date:
May 2015
Location:
United States
Posts:
19
Plugin Contributions:
0

Cannot log into admin, reset password does not work and phpMyAdmin fix not working

I cannot log into my client's admin area. I tried the reset password, but when I enter the email address it just goes back to the reset password page and does not give a message that password has been sent. I tried the fix suggested here https://www.zen-cart.com/content.php?44 but keep getting the following error:

Static analysis:

1 errors were found during analysis.

Unrecognized statement type. (near "FROM" at position 0)

SQL query:

FROM admin WHERE admin_name = '**********'

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM admin WHERE admin_name = '**********'' at line 1

In the query I did add the prefix to the FROM and TO fields, and In the example above I starred out the admin's name.

I wasn't sure what version the client was last upgraded to (they never let me know when the cart gives them the upgrade message), when I checked the implementation guide it says it is for version 1.5.4

The database server info reads as follows:

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.5.55-cll - MySQL Community Server (GPL)
Protocol version: 10
User: cpses_da6vi36inq@localhost
Server charset: UTF-8 Unicode (utf8)

And the php version is 5.6.30

Any help would be greatly appreciated.

2 Dec 2017, 5:47 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Cannot log into admin, reset password does not work and phpMyAdmin fix not working

A MySQL query cannot start with FROM. It needs to know what it is doing before it's told FROM or WHERE.

If you are doing the fix you mentioned, it should start with DELETE. If you are trying to do a query as to what exists in the admin table, it would start with SELECT.

2 Dec 2017, 6:02 PM
#3
webweaver2000 avatar

webweaver2000

New Zenner

Join Date:
May 2015
Location:
United States
Posts:
19
Plugin Contributions:
0

Re: Cannot log into admin, reset password does not work and phpMyAdmin fix not working

Thank you, I had copied and pasted the query but not sure why it left out the delete. I have managed to change the user to admin, but still cannot log in. Should I be pasting the password as 351683ea4e19efe34874b501fdbf9792:9b

Sorry to be a bother, I'm just not as well versed with this as you.

2 Dec 2017, 6:32 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Cannot log into admin, reset password does not work and phpMyAdmin fix not working

If it is as you said 1.5.4, you would use```
DELETE FROM #####admin WHERE admin_name = 'Admin';
INSERT INTO #####admin (admin_name, admin_email, admin_pass, admin_profile) VALUES ('Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1);


*IF*

**NO** prefix -- admin
**Prefix zen_** -- zen_admin
**Prefix bubba** -- bubbadmin (hope it's not *really* like that! Very confusing)

NOTHING else should be changed.

This should allow you to log in as Admin with the password of admin.  PLEASE NOTE which is capitalized and which is not.

You should be prompted immediately to change the password.  After log in, you should delete the temporary account after creating a new one for yourself.

AND...yes, I am telling you to do what is written at <https://www.zen-cart.com/content.php?44> for versions above 1.5.0
2 Dec 2017, 6:41 PM
#5
webweaver2000 avatar

webweaver2000

New Zenner

Join Date:
May 2015
Location:
United States
Posts:
19
Plugin Contributions:
0

Re: Cannot log into admin, reset password does not work and phpMyAdmin fix not working

I have done this and still cannot login. I enter the user and password as you mentioned above, but it just goes back to the login page with the fields blank and no message about wrong user name or password.

2 Dec 2017, 7:46 PM
#6
webweaver2000 avatar

webweaver2000

New Zenner

Join Date:
May 2015
Location:
United States
Posts:
19
Plugin Contributions:
0

Re: Cannot log into admin, reset password does not work and phpMyAdmin fix not working

Please disregard, this issue has been resolved. It was a case sensitive issue with the user name and password. Sorry to bother you.

2 Dec 2017, 10:10 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Cannot log into admin, reset password does not work and phpMyAdmin fix not working

NOTHING else should be changed.

This should allow you to log in as Admin with the password of admin. PLEASE NOTE which is capitalized and which is not.

You should be prompted immediately to change the password. After log in, you should delete the temporary account after creating a new one for yourself.

AND...yes, I am telling you to do what is written at https://www.zen-cart.com/content.php?44 for versions above 1.5.0

Not trying to brow beat you. I know it's new to you. Everyone should spend more time reading the instructions. Mark Twain might have said, "The longest way to anywhere is a shortcut.":P