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 21 to 32 of 32
This thread is locked. New replies are disabled.
22 Sep 2009, 5:43 PM
#21
fontaholic avatar

fontaholic

Zen Follower

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

can't get into admin

Hi Ajeh, Thanks for your continued patience with me. I'm still feeling like a fish out of water though....

Ajeh:

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

What is the table name for:
products

or is it:
something_products

in phpMyAdmin i can see zen_admin and products under my icwebstore db.

Ajeh:

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:

i tried to run the second bit of code again, but got a syntax error and i'm not sure what to do now... as i have no clue about sql syntax. my hubby tried to look at it, but he's out of practice at sql.

i also checked in configure.php and didn't find ANY references to the admin table there. i did find references to an admin table in /admin/configure.php that i changed to zen_admin [for example this line: define('DIR_FS_ADMIN', '/Applications/MAMP/htdocs/icwebstore/zen_admin/');] in several places in that file.

and... one question... with this change, i'm supposed to log in to my admin panel using the new name, yes? [http://localhost:8888/icwebstore/zen_admin/] and the un/pw admin admin, right?

i get to work on this project in lumps of time and have a few days to put into it this week. i hope i can get the admin panel working! :cry:

22 Sep 2009, 8:20 PM
#22
ajeh avatar

ajeh

Oba-san

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

Re: can't get into admin

First, you are mixing things up here ...

The reference to the "admin" in the configure.php is the reference to the directory name ...

The reference to the database is the table name "admin" where ALL of your tables either start with a prefix such as zen_ or they do not ...

You say in phpMyAdmin you see:
zen_admin
products

So I would venture to guess you also see a table called:
admin

In your configure.php files, you should see:

define('DB_PREFIX', '');

that means you do not use the prefixes ...

If the only table you have that starts with zen_ is the zen_admin then that is an error in trying to fix the admin table and can be deleted ...

If you do not use the prefix on the database table names then it sounds like you are trying to fix the admin table but referencing the wrong table name and now have both:
admin
zen_admin

Backup your database ...

Delete the table:
zen_admin

Now recreate your table:
admin

with the following SQL:

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);

This delete the existing table called:
admin

and create a new table called:
admin

and add a login for:
Admin
admin

that once you are in your Zen Cart Admin you can edit in the Tools ... Admin Settings ... with your proper login name, email and password ...

On the change to the configure.php you said:

i also checked in configure.php and didn't find ANY references to the admin table there. i did find references to an admin table in /admin/configure.php that i changed to zen_admin [for example this line: define('DIR_FS_ADMIN', '/Applications/MAMP/htdocs/icwebstore/zen_admin/');] in several places in that file.

Change that back to what it was as that is not a database reference that is a directory reference and your directory is probably:
/admin

NOTE: after everything is working again, you should review all of the Security Patches and updates and read the Tutorials for making your site more secure:
http://www.zen-cart.com/forum/showthread.php?t=131115

23 Sep 2009, 5:38 PM
#23
fontaholic avatar

fontaholic

Zen Follower

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

Re: can't get into admin

many thanks for your continued patience.

Ajeh:

Backup your database ...

Delete the table:
zen_admin

Now recreate your table:
admin

with the following SQL:

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);

> 
> This delete the existing table called:
> admin
> 
> and create a new table called:
> admin
> 
> and add a login for:
> Admin
> admin

I got this error:

Error

SQL query:

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

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 'and

INSERT INTO admin VALUES (1, 'Admin', 'admin@localhost', '351683ea4e19efe' at line 1


I think it created the table (because my admin panel login screen comes up, but it doesn't know the Admin/admin combo. should the final 1 in that string have tick marks around it? should i delete the new admin table before i try that again? :lookaroun:
23 Sep 2009, 9:50 PM
#24
fontaholic avatar

fontaholic

Zen Follower

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

Re: can't get into admin

ooh! i just found an 'insert' panel in the phpMyAdmin and was able to put the values from that INSERT line into a new row in the database. now i can get into my admin area! hooray!!

i will make sure to re-do the security measures before i get the site off my localhost and up to my hosting server.

thank you thank you thank you for all of your help. :clap::clap::clap:

23 Sep 2009, 10:09 PM
#25
ajeh avatar

ajeh

Oba-san

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

Re: can't get into admin

The error is I had an AND in the code:

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;
INSERT INTO admin VALUES (1, 'Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1);

Try running those two to remove and rebuild the admin table ...

23 Sep 2009, 10:10 PM
#26
ajeh avatar

ajeh

Oba-san

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

Re: can't get into admin

fontaholic:

ooh! i just found an 'insert' panel in the phpMyAdmin and was able to put the values from that INSERT line into a new row in the database. now i can get into my admin area! hooray!!

i will make sure to re-do the security measures before i get the site off my localhost and up to my hosting server.

thank you thank you thank you for all of your help. :clap::clap::clap:

Beat me to the solution ... thanks for the update ... :smile:

24 Sep 2009, 8:11 PM
#27
rich00693 avatar

rich00693

New Zenner

Join Date:
Feb 2009
Posts:
89
Plugin Contributions:
0

Re: can't get into admin

I try to install zencart somany times, by using Xampp1.72
I got following message when I try to log in the admin
how can I do??
Deprecated: Function ereg() is deprecated in C:\xampp\htdocs\store\includes\classes\db\mysql\query_factory.php on line 177
Deprecated: Function ereg() is deprecated in C:\xampp\htdocs\store\includes\classes\db\mysql\query_factory.php on line 412

27 Sep 2009, 10:50 PM
#28
countingsheep avatar

countingsheep

Zen Follower

Join Date:
Sep 2006
Posts:
154
Plugin Contributions:
0

Re: can't get into admin

Ignore this post!

3 Oct 2009, 4:39 AM
#29
rich00693 avatar

rich00693

New Zenner

Join Date:
Feb 2009
Posts:
89
Plugin Contributions:
0

Re: can't get into admin

I try to use another enviorment to install the zencart, after I install the client part is ok https://www.hoyaman.com, but the admin cannot, the admin is http://www.hoyaman.com/admin/login.php . I am using Syslogy file station II.
Is any one know how to solve the problem :cry:

18 Nov 2009, 1:26 PM
#30
bobthemolder avatar

bobthemolder

Zen Follower

Join Date:
Nov 2008
Posts:
164
Plugin Contributions:
0

Re: can't get into admin

I was having the same problems as fontaholic, I dropped the table, inserted admin/encrypted(admin) through phpmyadmin, and still no go.

19 Nov 2009, 2:06 PM
#31
adi5402 avatar

adi5402

New Zenner

Join Date:
Nov 2009
Posts:
20
Plugin Contributions:
0

Re: can't get into admin

I am having the same problem my admin page has gone blank

I am getting this error in my logs

PHP Fatal error:  main() [<a href='function.require'>function.require</a>]: Failed opening required 'DIR_FS_CATALOG_LANGUAGESenglish/meta_tags.php' (include_path='.:/usr/local/lib/php-4.4.7/lib/php') in /hermes/bosweb/web164/b1643/sl.thechess/public_html/shop/admin/includes/languages/english.php on line 50 

I am now looking at the sql settings as suggested 2 threads above

This has done my head in

i am losing my sleep

10 Dec 2009, 8:44 PM
#32
cobasa avatar

cobasa

New Zenner

Join Date:
Jul 2009
Posts:
1
Plugin Contributions:
0

Re: can't get into admin

new install of latest version. couldn't access admin. this is still an issue. resend pass doesn't work. resetting values to defaults as described here doesn't work.