Forums / General Questions / Completely locked out of Admin

Completely locked out of Admin

Started by andy_c27 on 13 May 2014, 10:45 PM · Views: 1,402

Results 1 to 9 of 9
13 May 2014, 10:45 PM
#1
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Completely locked out of Admin

Hi
I am using 1.5.1 and am completely locked out from my admin after I tried to do some changes to my htaccess on my website (Not admin side) was only something minor changing a redirect which I have now taken out ... Anyway now I cannot get back in ,have tried the password but don't get a new 1 .. Have tried this thread
http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-%28i-lost-it%29
and it doesn't let me in , I can see it has added it in my mysql as I can see both my normal log in and teh new added temp log in but it wont let me in have tried all variations of Admin as login password
Is there anything else I can try to get in

thanks

14 May 2014, 12:18 AM
#2
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,779
Plugin Contributions:
2

Re: Completely locked out of Admin

What exactly did you remove (then replace from your .htaccess file? Which folder was the file located in if it wasn't the admin .htaccess file? What statement displays when you attempt to login? Is it generating an error log in your log folder?
Please list all mods/changes that you have added from standard Zen Cart file set.

14 May 2014, 7:13 AM
#3
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: Completely locked out of Admin

What I originally did was change my site to show www.website ,instead of website no www.
removed
RewriteEngine On
RewriteCond %{HTTP_HOST} !^pewterworld.co.uk$ [NC]
RewriteRule ^(.*)$ http://pewterworld.co.uk/$1 [R=301,L]

debug is saying
[14-May-2014 04:43:20 Europe/London] PHP Fatal error: 1194:Table 'whos_online' is marked as crashed and should be repaired :: delete from whos_online
where time_last_click < '1400038100' in /var/www/vhosts/pewterworld.co.uk/httpdocs/includes/classes/db/mysql/query_factory.php on line 120

and unable to get into admin
site is now down completely
saying
WARNING: An Error occurred, please refresh the page and try again.

Have asked hosting to do a complete restore for me to see if that helps

14 May 2014, 7:56 AM
#4
forum5 avatar

forum5

Zen Follower

Join Date:
Jul 2006
Location:
Louisiana
Posts:
147
Plugin Contributions:
0

Re: Completely locked out of Admin

Andy-C27:

Hi
... I tried to do some changes to my htaccess on my website (Not admin side) ... I cannot get back in ,have tried the password but don't get a new 1 .. Have tried this thread
http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-%28i-lost-it%29
and it doesn't let me in , I can see it has added it in my mysql as I can see both my normal log in and teh new added temp log in but it wont let me in have tried all variations of Admin as login password
Is there anything else I can try to get in
thanks

(Note to Self: I always have at least two Admin logins). I assume you clicked "Resend Password" so,
Another way to manipulate the data from mySQLAdmin:
DISCLAIMER: I have not tried this on ZC ver. 1.5.x and above. It worked on 1.4.x and below. If ZC has not changed the method of storing passwords try this. Create a temp customer login with a password. Logout and go to mySQLAdmin. Find the new customer you created in the database. Simply cut-n-paste the new customer's password to the location of the previous Admin password you lost.

For added protection don't lose the original Admin pw. Create two new accounts. Cut-n-paste the existing Admin pw to one of the new customers pw location, thus retaining the original Admin PW. Take the other known customer pw and cut-n-paste it to the Admin login pw you lost within the database.

14 May 2014, 8:26 AM
#5
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: Completely locked out of Admin

Hey ,have managed to fix both my issues within the last 10 minutes .. I reset my website in mydatabasesql to none www. and admin came back .
I search for the debug error and found the solution ,something to do with whos_online so copied from my spare test site over and bobs your uncle
site up and running .. I do have a small error left but will look into that later as work is calling so have to go

14 May 2014, 9:43 AM
#6
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,779
Plugin Contributions:
2

Re: Completely locked out of Admin

Andy-C27:

Hey ,have managed to fix both my issues within the last 10 minutes .. I reset my website in mydatabasesql to none www. and admin came back .
I search for the debug error and found the solution ,something to do with whos_online so copied from my spare test site over and bobs your uncle
site up and running .. I do have a small error left but will look into that later as work is calling so have to go

Nice one.

14 May 2014, 3:03 PM
#7
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: Completely locked out of Admin

Although my site is up and running again ,this is the only debug error left atm and can't seem to find a solution

[14-May-2014 08:43:53 Europe/London] PHP Fatal error: 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 'TYPE=MyISAM' at line 1 :: CREATE TABLE whos_online ( customer_id int(11) default NULL, full_name varchar(64) NOT NULL default '', session_id varchar(128) NOT NULL default '', ip_address varchar(15) NOT NULL default '', time_entry varchar(14) NOT NULL default '', time_last_click varchar(14) NOT NULL default '', last_page_url varchar(255) NOT NULL default '', host_address text NOT NULL, user_agent varchar(255) NOT NULL default '', KEY idx_ip_address_zen (ip_address), KEY idx_session_id_zen (session_id), KEY idx_customer_id_zen (customer_id), KEY idx_time_entry_zen (time_entry), KEY idx_time_last_click_zen (time_last_click), KEY idx_last_page_url_zen (last_page_url) ) TYPE=MyISAM; in /var/www/vhosts/pewterworld.co.uk/httpdocs/includes/classes/db/mysql/query_factory.php on line 120

Any idea on this error

cheers

14 May 2014, 6:22 PM
#8
forum5 avatar

forum5

Zen Follower

Join Date:
Jul 2006
Location:
Louisiana
Posts:
147
Plugin Contributions:
0

Re: Completely locked out of Admin

Andy-C27:

Hey ,have managed to fix both my issues within the last 10 minutes .. I reset my website in mydatabasesql to none www. and admin came back .
... I do have a small error left but will look into that later as work is calling so have to go

Nice find Andy. Apparently I did not understand the real question.
On some cPanels there is a switch to treat the site the same whether the 'www' is present in the url or not. I always set mine to 'Both'. I ran into problems depending whether the calling device used a 'www' or not.

15 May 2014, 12:13 AM
#9
swguy avatar

swguy

Administrator

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

Re: Completely locked out of Admin

Andy, in the SQL script you're trying to run, change

TYPE=MyISAM

to

ENGINE=MyISAM

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.