Zen Cart Logo
Forums / Installing on a Linux/Unix Server / can't get into admin

can't get into admin

Locked

Views: 10,361

Results 1 to 20 of 32
This thread is locked. New replies are disabled.
24 Jul 2009, 4:03 AM
#1
robert4442 avatar

robert4442

New Zenner

Join Date:
Jun 2009
Posts:
52
Plugin Contributions:
0

can't get into admin

I tried twice now installinh Zen-Cart. After install( iwent through the whole process and put inall the info including the id and pass word for the admin) but it will not let me in. I tells me that I have the wrong info. When I try to use resent password it tells me the email is not correct. I have uploaded all the file each time I installed the program. I have another cart working with out any problems. Can any body help me?

24 Jul 2009, 3:01 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't get into admin

To reset the Admin password on your site ...

In phpMyAdmin you could rebuild the admin table in your database so that you have the default login and password ...

If you do not use a prefix on your database tables, as in the admin table is called: admin

you can then use:

DROP TABLE IF EXISTS admin;
CREATE TABLE 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;

and

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

If you use a prefix on your database tables, such as zen_ you could use:

DROP TABLE IF EXISTS zen_admin;
CREATE TABLE zen_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;

and

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

Now try to login to your Admin with:
Login: Admin
password: admin

Once in, you want to edit the Login to be your own with your own password and email address in the Tools ... Admin Settings ...

NOTE: make sure that you are using the correct database that is referenced in both the:
/includes/configure.php
/admin/includes/configure.php

NOTE: make sure both of those are referencing the same server and database as well ...

3 Aug 2009, 12:15 AM
#3
alpineaddict avatar

alpineaddict

New Zenner

Join Date:
Sep 2007
Posts:
3
Plugin Contributions:
0

Re: can't get into admin

having the same problem with admin login, after installing the security patch and changing the name of my admin folder. I have since reversed all the upgrade but i am still unable to login to ZC admin. tried the SQL query and got this error:

Error
SQL query:
CREATE TABLE zen_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 ;

MySQL said:
#1050 - Table 'zen_admin' already exists

What next?

3 Aug 2009, 4:37 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't get into admin

Please check the full commands for this ... they start with the:

DROP TABLE IF EXISTS zen_admin;

re-read my post and use the one that matches your database tables ...

4 Sep 2009, 8:45 PM
#5
fontaholic avatar

fontaholic

Zen Follower

Join Date:
Jun 2008
Posts:
111
Plugin Contributions:
0

Re: can't get into admin

thank you for this thread. i'm a zen cart newbie, but am jumping in with two feet and making a big dropship webstore to support my brick and mortar shop.

i am trying to reset my admin password, i have figured out how to run phpMyAdmin and then ran the command code (above the and) it asked me if i really wanted to do this, i said yes, and then then ran second bit of code, (INSERT INTO...) and hitting go. :oops:

clearly, this was not right, so i got the error:

MySQL said: Documentation
#1146 - Table 'icwebstore.admin' doesn't exist

so i tried running the whole code snipped again and it gave me another error, which i didn't write down :frusty: but then when i tried again, it gave me:

MySQL said: Documentation
#1050 - Table 'zen_admin' already exists

there was originally an admin table in my store database when i first opened phpMyAdmin. i thought that was the correct table. was there also a zen_admin and did i change the wrong one? i'm using 1.3.8 on a local installation. i recently installed easy populate.

any advice is appreciated. i'm peeved i didn't file the password i created.:blink:

4 Sep 2009, 10:04 PM
#6
fontaholic avatar

fontaholic

Zen Follower

Join Date:
Jun 2008
Posts:
111
Plugin Contributions:
0

Re: can't get into admin

oh, and when i try to launch my admin panel, i get this:

1146 Table 'icwebstore.admin' doesn't exist
in:
[select * from 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.

help! and THANKS!

5 Sep 2009, 3:13 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't get into admin

In phpMyAdmin ... do you see the table name:
admin
zen_admin

What is the table name for:
products

or is it:
something_products

Read post #2 and use the correct one to fix your database table for the:
admin

the table name must match ... so if you see:
fred_admin
fred_products

you need to replace the:
zen_admin with fred_admin

if you see:
admin
products

make sure you use the code without the prefix ...

NOTE: read post #2 carefully ... I just spotted a ... umm ... typo ... :blush:

6 Sep 2009, 8:01 PM
#8
cumbrianrider avatar

cumbrianrider

New Zenner

Join Date:
Jun 2008
Posts:
19
Plugin Contributions:
0

Re: can't get into admin

Hi all.

I've jus tinstalled Zencart and had a similar problem.

At first I thought I had really messed up the install but then stumbled upon an FAQ with one vital piece of info.

At present I don't have SSL on my site as not yet ready for that part.

However. On installation I kept the default setting for this part of the install. Bad move !

After looking at all sorts about reset to Admin and admin, messing with PHP files and .htaccess etc I suddenly found that the actual problem was the SSL settings !

I cannot remember now which FAQ it was but this may be your only problem with the installation. This was certainbly all that held me back from accessing my admin area. Once I edited the config file and uploaded it back to my webspace it worked no problem.

This is the enable SSL FAQ

https://www.zen-cart.com/tutorials/index.php?article=14

From what I can rememer I just left the https server bit blank i.e. remove the https://your domain bit from between ' and ' and set to false where it says true.

Hope that helps.

CR

9 Sep 2009, 3:09 PM
#9
pts3227 avatar

pts3227

New Zenner

Join Date:
Apr 2009
Posts:
56
Plugin Contributions:
0

Re: can't get into admin

cumbrianrider:

Hi all.

I've jus tinstalled Zencart and had a similar problem.

At first I thought I had really messed up the install but then stumbled upon an FAQ with one vital piece of info.

At present I don't have SSL on my site as not yet ready for that part.

However. On installation I kept the default setting for this part of the install. Bad move !

After looking at all sorts about reset to Admin and admin, messing with PHP files and .htaccess etc I suddenly found that the actual problem was the SSL settings !

I cannot remember now which FAQ it was but this may be your only problem with the installation. This was certainbly all that held me back from accessing my admin area. Once I edited the config file and uploaded it back to my webspace it worked no problem.

This is the enable SSL FAQ

https://www.zen-cart.com/tutorials/index.php?article=14

From what I can rememer I just left the https server bit blank i.e. remove the https://your domain bit from between ' and ' and set to false where it says true.

Hope that helps.

CR

I'm having a similaar issue, i was able to log in to admin recently but now I can't nothing has changed, I even created a fake site with all similar info and did a comparison and all the info seems to match and I still can't log in. :frusty: Any help is greatly appreciated. I have a prefix in my login code, etc. I have all my logins and paswords written down, I know, not safe.... so I know they are correct... and I even get the email issue. Another issue, if I do get it to email me a password, it emails one to reset the password to my other cart. It seems to have the 2 mixed up, like the wires are crossed. That is why I first compared codes.... any thought????

11 Sep 2009, 3:58 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't get into admin

Check the two configure.php files in:
/includes/configure.php
/admin/includes/configure.php

are you using the right URLs, paths, database table, username and password?

11 Sep 2009, 4:37 AM
#11
stangirl avatar

stangirl

New Zenner

Join Date:
Jan 2009
Posts:
13
Plugin Contributions:
0

Re: can't get into admin

Having the same problem. SO ULTRA FRUSTRATED. Everything was working fine, then I changed the database name with godaddy. Both db names are correct in both config files. I've dropped the zen_admin table and rebuilt it. I've looked at the session file and it seems fine. SSL is defined as false since I won't be using a secure server.

Holy MOLY is there anything else that could possibly work here. :censored:

11 Sep 2009, 12:41 PM
#12
pts3227 avatar

pts3227

New Zenner

Join Date:
Apr 2009
Posts:
56
Plugin Contributions:
0

Re: can't get into admin

Ajeh:

Check the two configure.php files in:
/includes/configure.php
/admin/includes/configure.php

are you using the right URLs, paths, database table, username and password?

I went in to both and everything shows correct as best I can tell. I compared to my dummy site as well and it looks the same, but still nothing....

14 Sep 2009, 2:42 PM
#13
pts3227 avatar

pts3227

New Zenner

Join Date:
Apr 2009
Posts:
56
Plugin Contributions:
0

Re: can't get into admin

Ok, I have compared both configure.php files in both my active site and the dummy one I created and they are identical, the dummy one works yet the active one will not... I am so confused... :frusty::frusty: What am I missing?

14 Sep 2009, 7:39 PM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't get into admin

Could you post the configure.php from the server without the username or password for:
/admin/includes/configure.php

16 Sep 2009, 2:36 PM
#15
pts3227 avatar

pts3227

New Zenner

Join Date:
Apr 2009
Posts:
56
Plugin Contributions:
0

Re: can't get into admin

Ajeh:

Could you post the configure.php from the server without the username or password for:
/admin/includes/configure.php

Sorry I don't know how to post it properly so that it wraps correctly, but here it is. I can get it to work, but here is what I am doing and perhaps can shed some light. I need to have 2 carts, both with identical items minus 20-30 parts with different numbers. so instead of reinputing all the parts we are wanting to copy the database over, is that possible? Everytime she does, this happens and we can't get into admin anymore, then I have to start all over and rebuild the admin!?!? :frusty::frusty: Cart 1 will have dealer and retailer pricing and cart 2 will have dealer, retailer and whole sale pricing and different part numbers, very annoying i know, we just don't want to have to reinput thousands of parts, it took us months. Thank you for your help.

define('HTTP_SERVER', 'http://www.trailermateusa.com');
define('HTTPS_SERVER', 'https://www.trailermateusa.com');
define('HTTP_CATALOG_SERVER', 'http://www.trailermateusa.com');
define('HTTPS_CATALOG_SERVER', 'https://www.trailermateusa.com');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/tmproducts/admin/');
define('DIR_WS_CATALOG', '/tmproducts/');
define('DIR_WS_HTTPS_ADMIN', '/tmproducts/admin/');
define('DIR_WS_HTTPS_CATALOG', '/tmproducts/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_ADMIN', '/home/pts3227/public_html/trailermateusa.com/tmproducts/admin/');
define('DIR_FS_CATALOG', '/home/pts3227/public_html/trailermateusa.com/tmproducts/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'pts3227_username');
define('DB_SERVER_PASSWORD', 'password');
define('DB_DATABASE', 'pts3227_tmproducts');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');
// for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/pts3227/public_html/trailermateusa.com/tmproducts/cache');

// EOF

16 Sep 2009, 4:00 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't get into admin

I am not seeing anything obvious ...

Make sure that the two databases are being used in the two configure.php files correctly ...

The files:
/includes/configure.php
/admin/includes/configure.php

/othershop/includes/configure.php
/othershop/admin/includes/configure.php

Make sure that you have not mixed up the databases being used for each set of files ...

16 Sep 2009, 4:09 PM
#17
pts3227 avatar

pts3227

New Zenner

Join Date:
Apr 2009
Posts:
56
Plugin Contributions:
0

Re: can't get into admin

Ajeh:

I am not seeing anything obvious ...

Make sure that the two databases are being used in the two configure.php files correctly ...

The files:
/includes/configure.php
/admin/includes/configure.php

/othershop/includes/configure.php
/othershop/admin/includes/configure.php

Make sure that you have not mixed up the databases being used for each set of files ...

What she explained to me was that after I uploaded and created the database and we were ok and working (able to log in to admin and see the standard green template). She followed the "I want to move to a different server" etc tutorial and basically took a back up she had of our database 1 and imported into under our database 2 and then all this started. When I go in to verify the files all seems fine as you can see, I try to have it email me the password and it emails me a password for database 1 instead of 2 like it should. :frusty:

16 Sep 2009, 4:22 PM
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't get into admin

It really sounds like you have either mixed up database tables or mixed up configure.php files or ... you have your site on two servers and the new server has not propagated things yet so you are running off the old server ...

16 Sep 2009, 4:29 PM
#19
pts3227 avatar

pts3227

New Zenner

Join Date:
Apr 2009
Posts:
56
Plugin Contributions:
0

Re: can't get into admin

Ajeh:

It really sounds like you have either mixed up database tables or mixed up configure.php files or ... you have your site on two servers and the new server has not propagated things yet so you are running off the old server ...

Just one server, one computer, one copy of the same database on that computer, I go in and create the shopping cart and get everything running and logged in and such, and then she follows the import instructions to import that database to our 2nd site and all heck breaks loose and I have to start over. Once the database is imported we can't log in any more, right before it, we are fine... so confused... Our other site works fine, admin and all, never have an issue, only when we try to set up the 2nd site with the same database... here are out 2 sites... https://www.ptrailerusa.com (the working admin and site) and https://www.trailermateusa.com (the non working admin, working site).

17 Sep 2009, 3:09 PM
#20
pts3227 avatar

pts3227

New Zenner

Join Date:
Apr 2009
Posts:
56
Plugin Contributions:
0

Re: can't get into admin

oOk, well I guess I have to start all over again, so if I do, how can I copy all of my products from my one cart and customers maybe I really dont care about anything else, the most important part are the products. We are seriously trying to avoid having to input all of the stuff into the 2nd cart all over again.... :(