magento_logo_narrow

How to Fix Magento Login Problem in Chrome ?

The long and short of the fix is that apparently the newer Magento version is implementing some security check to make sure that the domain is a valid one that is accessing the admin page; a valid domain name or host consists of one with a period in the host name, so if you are installing locally using something like http://localhost, YOU WILL RUN INTO THIS PROBLEM! There are a couple ways to fix this

The long and short of the fix is that apparently the newer Magento version is implementing some security check to make sure that the domain is a valid one that is accessing the admin page; a valid domain name or host consists of one with a period in the host name, so if you are installing locally using something like http://localhost, YOU WILL RUN INTO THIS PROBLEM! There are a couple ways to fix this

How to Fix Magento Login Problem in Chrome ?

In the latest version of which i’m using is 1.6.0.0

Open file: app\code\core\Mage\Core\Model\Session\Abstract\varien.php

$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
Comment these lines line (may be at line 78…);

So after doing r&d i found out the solution

search for “// session cookie params” line in app\code\core\Mage\Core\Model\Session\Abstract\varien.php

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

to

$cookieParams = array(
‘lifetime’ => $cookie->getLifetime(),
‘path’ => $cookie->getPath()
);

and comment the below mentioned code
line number 86, in my file

/* if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}

if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}
*/

Now login as admin, it will work.
Comment here if this trick work for you or not, if it is working help us by sharing it. :P

Related posts:

  1. Android login authentication with remote (MySql)database
  2. Google AdSense Publisher Toolbar for Chrome