Home    Articles

 

Magento admin login not working in chrome, it works in firefox on localhost

 

This issue still persist in 1.7.2 and 1.8.1 magento versions.

This is happening if you installed magento on localhost.

In order to be able to login into your admin area via chrome open the file:
/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

Search for:

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

Comment the code:

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

This helped anyone who faced this issue. Try it.
It should work.

by