Forums / General Questions / Can't login to admin with google-chrome.. works fine on IE!

Can't login to admin with google-chrome.. works fine on IE!

Locked

Started by dxblouie on 11 Oct 2010, 12:56 AM · Views: 3,346

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
11 Oct 2010, 12:56 AM
#1
dxblouie avatar

dxblouie

New Zenner

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

Can't login to admin with google-chrome.. works fine on IE!

i had ZC 1.3.9d, and i noticed that when i try to enter my admin area with the correct username and password i got an error saying "There was a security error when trying to login."

i searched around, checked all the obvious, all my templates, etc.. everything is fine!

i figured i'd upgraded to 1.3.9g before posting a question.. and the problem persisted :(

not sure why i thought of trying to login with ie9 but to my surprise i got logged in right away!
tried again on chrome.. no difference.
i deleted cookies, etc.. still no difference... i can't login to admin area through chrome!

i finally went into admin/login.php and edited it around line 22 as follows:

    if ((!isset($_SESSION['securityToken']) || !isset($_POST['securityToken'])) || ($_SESSION['securityToken'] !== $_POST['securityToken'])) {
      $message = true;
      $pass_message = ERROR_SECURITY_ERROR;
        //DEBUG
        echo "sess - ".$_SESSION['securityToken']."<br>";
        echo "post - ".$_POST['securityToken']."";
    }

then tried to login to figure out what's going wrong on chrome.
both parameters are set, but their value never matches if i login through chrome for some reason

everytime i hit login, a new session token was generated and the previous session token is shown as the current post token.. so the values never match

i.e: login 1:
sess - f76ced2335ff1c6078fb2bf0d09bd4a5
post - a6bc3e59c9d1b493028b3c37749008a7

login 2:

sess - c1c205b71ae87a370fce114f5d381f4f
post - f76ced2335ff1c6078fb2bf0d09bd4a5

login 3:
sess - 05dc14dce3c20a8e856aeebef8ae4722
post - c1c205b71ae87a370fce114f5d381f4f

and so on..

can anybody make sense of this? i think it's got to do with the session not persisting on form post.. but i'm not sure why this only happens on chrome

11 Oct 2010, 1:59 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can't login to admin with google-chrome.. works fine on IE!

can anybody make sense of this? i think it's got to do with the session not persisting on form post.. but i'm not sure why this only happens on chrome
It is a browser setting not a Zencart issue

Zen-Venom Get Bitten

11 Oct 2010, 2:54 AM
#3
dxblouie avatar

dxblouie

New Zenner

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

Re: Can't login to admin with google-chrome.. works fine on IE!

kobra:

It is a browser setting not a Zencart issue

I can't seem to find such a setting anywhere on chrome, not to mention that I can login to just about anything, from forums, to mail servers and control panels, etc... This problem only came up with ZC admin panel on google chrome.
I'm not sure I understand what setting could trigger such behavior... Any idea?
Posted via Mobile Device

11 Oct 2010, 4:03 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can't login to admin with google-chrome.. works fine on IE!

I would have to get chrome...
Maybe another that has it will respond

Zen-Venom Get Bitten

11 Oct 2010, 10:08 AM
#5
spid3r1987 avatar

spid3r1987

Zen Follower

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

Re: Can't login to admin with google-chrome.. works fine on IE!

i sometimes get that error with firefox, i just click login again and it logs me in :S

will check GC now though

i may not know how yet, but i soon will....i hope :)

11 Oct 2010, 10:09 AM
#6
spid3r1987 avatar

spid3r1987

Zen Follower

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

Re: Can't login to admin with google-chrome.. works fine on IE!

just tried it on my GC, working fine, on 3 different ZC websites... :S

i may not know how yet, but i soon will....i hope :)

11 Oct 2010, 12:37 PM
#7
dxblouie avatar

dxblouie

New Zenner

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

Re: Can't login to admin with google-chrome.. works fine on IE!

spid3r1987:

just tried it on my GC, working fine, on 3 different ZC websites... :S

one thing i notice, is when i go to mysite/admin the url automatically changes to mysite/admin/login.php?zenAdminID=g11mc5f87v4fjcqbsu75fcfeq0 (or another token)

only happens on chrome.. not ie

11 Oct 2010, 1:39 PM
#8
spid3r1987 avatar

spid3r1987

Zen Follower

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

Re: Can't login to admin with google-chrome.. works fine on IE!

DXBLouie:

one thing i notice, is when i go to mysite/admin the url automatically changes to mysite/admin/login.php?zenAdminID=g11mc5f87v4fjcqbsu75fcfeq0 (or another token)

only happens on chrome.. not ie

sounds a bit daft, but clear cache etc...
then have another look??
might be that its stored that sess....
mine goes to a zenadmin id aswell.....
try clearing cache and going to admin again....

by clearing my cache and stored username & passwords it removed my zenid...

i may not know how yet, but i soon will....i hope :)

11 Oct 2010, 4:08 PM
#9
dxblouie avatar

dxblouie

New Zenner

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

Re: Can't login to admin with google-chrome.. works fine on IE!

i already did that on chrome :(
i even tried the incognito mode, which basically starts with no history, no cookies, no form data or saved password..

same thing.. i hit admin/login.php, i typed the username and password and hit login

the form reloaded with login.php?zenAdminID=q0c55td3hghm0o8n88smoid6p1 in the URL and the debug showed
sess - d5bb2d29e0f2753ab390fb4cb9ffaa82
post - d2ebd39b7347abe301f72ff40079767d

i'm seriously lost here

1 Dec 2010, 12:20 PM
#10
dxblouie avatar

dxblouie

New Zenner

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

Re: Can't login to admin with google-chrome.. works fine on IE!

i've upgraded to 1.3.9h hoping this would solve the problem.. no difference

i figured i'd try a fresh install.. i created a new database, deleted all my browser cookies, installed a fresh copy of zc 1.3.9h and configured it.
same problem!! i can login to admin through ie, while google chrome still shows "There was a security error when trying to login"

i don't get it anymore :S

3 Dec 2010, 10:19 PM
#11
dxblouie avatar

dxblouie

New Zenner

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

Re: Can't login to admin with google-chrome.. works fine on IE!

i installed it again on a different server.. again the same damn problem!
come on people, i can't be the only one having this!! someone please suggest something :(

3 Dec 2010, 10:53 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Can't login to admin with google-chrome.. works fine on IE!

I don't use Chrome because I fundamentally believe Google's TOS is unacceptable.

That said, regardless of browser, the zenAdminId is added because no valid session cookie can be found.
What do your cookies contain? How does that compare with your website URL? and your SSL URL? Are you using shared SSL? or dedicated? If you disable SSL in your admin temporarily, does the problem go away? If you change your admin HTTP_SERVER to be the same as your HTTPS_SERVER, does the problem go away?
Are you running your store in a subdirectory, instead of in the root? Are you using a subdomain other than "www."?

.
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.

3 Dec 2010, 11:03 PM
#13
dxblouie avatar

dxblouie

New Zenner

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

Re: Can't login to admin with google-chrome.. works fine on IE!

Thanks for the response!

i don't have SSL enabled altogether and my admin configure.php has
define('HTTP_SERVER', 'http://192.168.1.5');
define('HTTPS_SERVER', 'https://192.168.1.5');
define('HTTP_CATALOG_SERVER', 'http://192.168.1.5');
define('HTTPS_CATALOG_SERVER', 'https://192.168.1.5');
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'false');

i came across a suggestion on another thread to set Use root path for cookie path to TRUE.. no difference.

my store is under construction, and is currently under http://192.168.1.5/lm/lrp, physical path is /home/lm/public_html/lrp
all these settings are reflected in the configuration, and it may be worth mentioning that i was able to login to admin before upgrading to one of the early 1.3.9 releases (i think 1.3.9d)

i can login to admin using IE any with zero problems

3 Dec 2010, 11:10 PM
#14
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Can't login to admin with google-chrome.. works fine on IE!

i can login to admin using IE any with zero problems

Then why all this fuss about Google Chrome? It's not exactly mandatory - you don't have to use it. And this is a local development installation where any number of other factors may come into play.

I can tell you one thing for certain - there will be a whole host of things you cannot login to using Google Chrome and that's in an online live environment.

The problem lies with Google Chrome and not with Zen Cart.

Vger

3 Dec 2010, 11:22 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: Can't login to admin with google-chrome.. works fine on IE!

I'm not surprised about the cookie issue when using an IP address instead of a resolvable name.
You could try "localhost" if you don't need to access it from other computers on your local network.

Vger raises good points ;)

.
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.

3 Dec 2010, 11:37 PM
#16
dxblouie avatar

dxblouie

New Zenner

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

Re: Can't login to admin with google-chrome.. works fine on IE!

192.168.1.5 is actually my linux box where the development store lives.
i'll give it a DNS record and see if that makes a difference

thanks for the time and help