Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2007
    Posts
    16
    Plugin Contributions
    0

    Default OH SNAP -- Locked out of Zen Cart Admin

    Hey everybody,

    I'm locked out of my zen cart admin page. In fact, I tried to fix it in phpmyadmin and though I thought I knew what I was doing, I must not have. :-( However, on the good side, the store is still up...

    I am wrapping up development of a store for a client and at the end went to change the admin e-mail to their e-mail address. I did, and assumed the password was the same (I didn't change it). I went to the client's computer, tried to login -- no luck. I requested a new password, the new password didn't work.

    So I followed this thread: http://www.zen-cart.com/forum/showthread.php?p=456063

    I have a prefix of zencart_ on my zen cart database, so I edited his SQL command:
    Code:
    DROP TABLE IF EXISTS zencart_admin;
    CREATE TABLE zencart_admin (
      zencart_admin_id int(11) NOT NULL auto_increment,
      zencart_admin_name varchar(32) NOT NULL default '',
      zencart_admin_email varchar(96) NOT NULL default '',
      zencart_admin_pass varchar(40) NOT NULL default '',
      zencart_admin_level tinyint(1) NOT NULL default '1',
      PRIMARY KEY  (zencart_admin_id),
      KEY idx_admin_name_zen (zencart_admin_name)
    ) TYPE=MyISAM;
    and then

    Code:
    INSERT INTO admin VALUES (1, 'Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1);


    I now get this messages on /zencart/admin when I try to login:

    1054 Unknown column 'admin_name' in 'where clause'
    in:
    [select * from zencart_admin where admin_name='demo' or admin_name='Admin']
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.


    Your help very appreciated! I'll keep looking in phpMyAdmin carefully.

  2. #2
    Join Date
    Oct 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: OH SNAP -- Locked out of Zen Cart Admin

    I went crazy prefixing the SQL code, this corrected code works:

    Code:
    DROP TABLE IF EXISTS zencart_admin;
    CREATE TABLE zencart_admin (
      admin_id int(11) NOT NULL auto_increment,
      admin_name varchar(32) NOT NULL default '',
      admin_email varchar(96) NOT NULL default '',
      admin_pass varchar(40) NOT NULL default '',
      admin_level tinyint(1) NOT NULL default '1',
      PRIMARY KEY  (admin_id),
      KEY idx_admin_name_zen (admin_name)
    ) TYPE=MyISAM;
    Notice that after the table zencart_admin is created it has its own columns or rows whatever...admin_id, admin_name and so on. Those aren't prefixed!

    Then this worked just fine and all was canycanes and lollipops:

    Code:
    INSERT INTO admin VALUES (1, 'Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1);

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: OH SNAP -- Locked out of Zen Cart Admin

    Thanks for the update ... hate when the global replace does exactly what we tell it to do ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Oct 2007
    Location
    DFW, TX
    Posts
    21
    Plugin Contributions
    0

    Default Re: OH SNAP -- Locked out of Zen Cart Admin

    I had this same problem earlier today, so I just started over...

    How often does this happen and is it a big issue?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: OH SNAP -- Locked out of Zen Cart Admin

    Quote Originally Posted by jaggers View Post
    How often does this happen and is it a big issue?
    There are only a few reasons why you would get an "Invalid password" message from the admin while trying to log in.
    - someone changed the password ... either authorized or unauthorized
    - serious data corruption causing damage to the admin table ... in which case it's likely that other tables are damaged as well

    If someone is changing your password without authorization, you might want to check on who's got access to your site. You might check the admin_activity_log records in the database to see whether all attempts to access admin pages are coming from authorized IP addresses ... and consider changing the folder your admin runs from (as suggested in the security guidelines ... see the FAQ and your Zen Cart /docs/ folder).
    .

    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.

 

 

Similar Threads

  1. Locked out of Admin
    By solotripper in forum Basic Configuration
    Replies: 3
    Last Post: 16 Nov 2010, 03:52 AM
  2. I'm locked out of Admin
    By spaskinstyle in forum General Questions
    Replies: 1
    Last Post: 8 Oct 2008, 01:40 AM
  3. Locked out of admin?
    By bogie in forum General Questions
    Replies: 5
    Last Post: 27 Sep 2008, 09:42 PM
  4. I am locked out of my Admin
    By travel124 in forum Basic Configuration
    Replies: 0
    Last Post: 14 Apr 2008, 12:59 AM
  5. Locked out of Zen-Cart
    By Flash619 in forum General Questions
    Replies: 4
    Last Post: 9 Aug 2007, 01:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR