Cannot login to Magento admin panel with Google Chrome

I was also reminded today of the fact that I cannot use Google Chrome to login to the Magento Admin Panel on localhost. Every time I enter the username and password I am returned to the login page. Works fine with Safari and Firefox on my Mac just not Google Chrome my preferred browser.

One of the workarounds posted on the internet is to change the cookie timeout using the admin panel.

System > Configuraton > Web > Session Cookie Management

I tried changing with Safari but it did not work. Perhaps I should have cleared cookies.

I got it work in the end by editing

app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

and changing this


$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);

to


$cookieParams = array(
// 'lifetime' => $cookie->getLifetime(),
// 'path' => $cookie->getPath(),
// 'domain' => $cookie->getConfigDomain(),
// 'secure' => $cookie->isSecure(),
// 'httponly' => $cookie->getHttponly()
);

It feels very wrong to have to do this.

You may need to clear localhost cookies and keychain on Mac.

Advertisements

One Response to “Cannot login to Magento admin panel with Google Chrome”

  1. RdeBoer Says:

    Thanks so much for this. I installed Magento on my Mac and ran into exactly this. As it was my very first encounter I thought I was crazy or simply had made a mistake in the install. Took me hours! I normally only use Chrome, until by sheer accident I tried to log in with Firefox and everything was fine.
    Thanks so much for leaving this on the Internet. A year after this publication this is, sadly, still true.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: