Zen Cart Logo
Forums / General Questions / Can't log into Admin

Can't log into Admin

Locked

Views: 11,355

Results 21 to 40 of 40
This thread is locked. New replies are disabled.
10 Dec 2006, 10:45 PM
#21
rebelwax avatar

rebelwax

New Zenner

Join Date:
Nov 2006
Location:
Toronto, Ontario
Posts:
63
Plugin Contributions:
0

Can't log into Admin

I am also experiencing this problem. I just installed mySQL and phpmyadmin on my local machine and every time i try to login to my admin panel it does nothing. I'm stumped.

10 Dec 2006, 11:33 PM
#22
dscvry avatar

dscvry

New Zenner

Join Date:
Dec 2006
Location:
France
Posts:
20
Plugin Contributions:
0

Re: Can't log into Admin

A quick question ...
Is it likely that non-recognition of the password and the failure of the 'resend email' feature are somehow related ?

10 Dec 2006, 11:52 PM
#23
rebelwax avatar

rebelwax

New Zenner

Join Date:
Nov 2006
Location:
Toronto, Ontario
Posts:
63
Plugin Contributions:
0

Re: Can't log into Admin

dscvry:

A quick question ...
Is it likely that non-recognition of the password and the failure of the 'resend email' feature are somehow related ?

I noticed that too. I tried to resend my password and it didn't work either. I have a fresh install of Zen 1.3.6 with Apache/1.3.33 (Darwin) PHP/5.2.0 and MySQL 4.1.22 on my macbook pro.

11 Dec 2006, 10:16 AM
#24
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Can't log into Admin

Here is a solution to the same problem, as posted in another thread.


Seems I ran into the php 5.2 update bug.
This fixed it (from another thread):

edit /includes/functions/sessions.php

function _sess_write($key, $val) {
global $db;

change to:

function _sess_write($key, $val) {
// The following is only to work around a PHP 5.2.0 bug:
//global $db;
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);

11 Dec 2006, 1:22 PM
#25
dscvry avatar

dscvry

New Zenner

Join Date:
Dec 2006
Location:
France
Posts:
20
Plugin Contributions:
0

Re: Can't log into Admin

To clarify the PhP 5.2 bug fix (cf Website Rob post),
1 - open up the file sessions.php located in
[...] /includes/functions/
2 - in the code for the function _sess_write($key, $val)
add in the comment prefixed by two forward slashes,
and forward slash the next line also to skip running 'global $db '
3 - then add the lines & save
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
Then
4 - re-run the 'Admin/admin' SQL query to set up the temporary password permissions
5 - attempt login

The host in my case has PhP 5.1.6 but I tried it anyway ... no change: no access to Zencart adminstrator, password appears to be recognised, password resend doesn't work ('email error').

*> Something else:

Putting that on one side, to get around this admin entry barrier, why not log in to the ghost store via the front page as a customer, then pick up the assigned login details as recorded in the database tables and give the 'customer' Adminstrator status via the admin table ? 'Customer'/'Adminstrator' should then be able to login to Zencart administrator with recognised username and password, right ?

In the database, customer login usernames (which are email addresses) and passwords are stored strangely enough in the 'customers' table. BTW, when I tried to sign up as customer, the same error occured as when trying to post back the Admin login password - blank white screen with just 'email error' on it. My customer details were logged in the address book OK, and by back-paging I found I was logged in anyway. Logging out and logging in again showed that the email/username was working [clue for the Zencart team to check the Admin password re-send code against validation routine(s) ??].

Now I take the customer username/email and password and make an Administrator out of him (not too dificult but character-forming nonetheless), first by direct entries into the admin database (no success with this route), then by running the SQL query (dummy variables cited here):

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),
KEY idx_admin_email_zen (admin_email)
) TYPE=MyISAM;

INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level) VALUES ('[email protected]', 'admin@localhost', '72dab1fdcefe73f68eed5a884a289cf5:af', 1);

This doesn't work either: in both cases no access to Zencart adminstrator, username/password combo is not recognised at all, password resend doesn't work ('email error'). Caramba ...

A clue for those that know about these things might lie with the answer to why the customer email gets you in to the store but the admin email resend just generates an error ... a question for the Zencart team: where would the best place be to start looking for that sort of thing ?

12 Dec 2006, 1:12 AM
#26
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Can't log into Admin

Regarding the 'INSERT INTO' statement, do not make your 'admin_name' an eMail address.

INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level) VALUES ('Buddy', 'buddy@real_domain.com', '', 1);

Using the above statement as an example, it should set the password to blank, nothing, nada. Enter Admin name and hit the 'login' button. Not the most secure but should be OK for the short time it would take to see if it works.

12 Dec 2006, 1:50 AM
#27
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't log into Admin

If entering an admin name and password comes back to login page without giving an error about password invalid etc, then you have a problem with sessions.
So, either your PHP configuration is set to deal with sessions incorrectly, or your browser and/or firewall are blocking session cookies etc.

Often testing from another browser and even another PC and/or another house/office will show whether the problem is related to the browser/firewall. If the problem persists, then it's likely the PHP configuration on the webserver.
During installation, were there any warnings on the System Inspection page which you chose to ignore?

12 Dec 2006, 1:55 AM
#28
ajeh avatar

ajeh

Oba-san

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

Re: Can't log into Admin

dscvry ... your INSERT is in the wrong format so if you look in your admin table via phpMyAdmin you would see that the fields are not filled in correctly ...

Note: folks with php 5.2.0 should check if the issue isn't a bug in that php version:
http://www.zen-cart.com/forum/showthread.php?t=50534&highlight=Execute%2A

Check #26

Note:
/includes/functions/sessions.php
/admin/includes/functions/sessions.php

They are similar and can be adapted to get past the php 5.2.0 bug ...

12 Dec 2006, 3:21 AM
#29
rickie_rich avatar

rickie_rich

New Zenner

Join Date:
Dec 2006
Posts:
3
Plugin Contributions:
0

Re: Can't log into Admin

it isnt really a php problem they have made it more secure. Zen cart need to do the work around. They should hold how it is cached and then explicitly load the variable in accordance to how it is cached. It is alot better than keeping it loose and dangleling

12 Dec 2006, 6:14 AM
#30
ajeh avatar

ajeh

Oba-san

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

Re: Can't log into Admin

Might do a search on this as an awful lot of sites have a problem with it and php has committed a fix for it ... :unsure:

12 Dec 2006, 6:22 AM
#31
rickie_rich avatar

rickie_rich

New Zenner

Join Date:
Dec 2006
Posts:
3
Plugin Contributions:
0

Re: Can't log into Admin

there is a thread on here that states that they retracted that it was a problem. And if you look at it is a pretty loose way to do it in the first place

30 Dec 2006, 4:30 AM
#32
solarflare avatar

solarflare

Zen Follower

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

Re: Can't log into Admin

Has anyone found a real solution to this short of re-installing? Which I'd like to avoid.

I've tried all the fixes suggested, destroying tables, creating new users etc, but I can't get into the admin of my store.

The store itself appears fine, but the admin login just keeps looping around as if nothing happened. If I do enter the wrong PW, it gives me an error, so it is working.

In FF2, when I enter the correct details it asks me to download index.php which ends up as an empty file.

I'd rather not reinstall as I'm barely sure how I got this far.

Jeff
(Happy Holidays)

30 Dec 2006, 4:35 AM
#33
ajeh avatar

ajeh

Oba-san

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

Re: Can't log into Admin

The new v1.3.7 just released has the fix ...

http://www.zen-cart.com/forum/showthread.php?t=54615

Note: you could just add the fix that is posted on this thread or on any of the other threads concerning php 5.2.0 and its bug ...

Perhaps this will help if you are not immediately upgrading to v1.3.7 ...

http://www.zen-cart.com/forum/showpost.php?p=287587&postcount=26

30 Dec 2006, 4:41 AM
#34
solarflare avatar

solarflare

Zen Follower

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

Re: Can't log into Admin

Ajeh:

The new v1.3.7 just released has the fix ...

http://www.zen-cart.com/forum/showthread.php?t=54615

Note: you could just add the fix that is posted on this thread or on any of the other threads concerning php 5.2.0 and its bug ...

Wow - fast response for a friday night!

Since it's a non-functioning store (ie: not public) I could just go ahead with the upgrade to 1.37. I'm running on PHP 4.4.4 and MySQL 4.1.21 - will the fix work?

30 Dec 2006, 4:45 AM
#35
ajeh avatar

ajeh

Oba-san

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

Re: Can't log into Admin

Perhaps the "real solution for this" is a bit vague ... :unsure:

Which "this" are you having a problem with? :smile:

30 Dec 2006, 5:30 AM
#36
solarflare avatar

solarflare

Zen Follower

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

Re: Can't log into Admin

Ajeh:

Perhaps the "real solution for this" is a bit vague ... :unsure:

Which "this" are you having a problem with? :smile:

Ah - clarity is what you seek. Ok, the problem is not being able to log into admin. I'm going to apply the PHP 5 patch and see what it does. Then upgrade to 1.3.7

30 Dec 2006, 5:36 AM
#37
ajeh avatar

ajeh

Oba-san

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

Re: Can't log into Admin

I would do the v1.3.7 first then the php ...

This would help discover if the issue is the code is off on your site without complicating it with a php upgrade ... :smile:

30 Dec 2006, 6:46 PM
#38
solarflare avatar

solarflare

Zen Follower

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

Re: Can't log into Admin

And this morning it all works.

Last night I installed a fresh 1.3.7 using the same domain but a different folder. I installed to a fresh DB, and it wouldn't let me log in right off the bat.

This morning, I try logging into the ORIGINAL store (1.3.6) and it worked fine. I think my host was either having trouble, or messing around.

31 Dec 2006, 12:12 AM
#39
ajeh avatar

ajeh

Oba-san

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

Re: Can't log into Admin

A lot of times this is a cache or cookie or browser issue and when everything times out etc. the magic occures ... or you have gremlins ... :eek:

Thanks for the update! :smile:

2 Jan 2007, 1:57 AM
#40
dscvry avatar

dscvry

New Zenner

Join Date:
Dec 2006
Location:
France
Posts:
20
Plugin Contributions:
0

Re: Can't log into Admin

As a p.s. on this for info, there wasn't any solution happening for me with 1.36, not with code tweaks :no:, nor shifting to different host environments :schmoll:, nor laying off booze for a week :cry:, or nuffink. But 1.37 is a sweetie ... instant access to Admin every time. Whatever the problem was, it looks to have been engineered out with the upgrade - bravo !