Here I will show how to resolve the Magento
admin panel login issue.
It’s a common issue: you are trying to login
to the Magento admin panel, typed your username and password, clicked Login
button and nothing happens. The page refreshes and that’s all. No error or any
other messages.
This is caused by the cookies issue. In some
cases Magento can’t store them. Let’s see how the issue can be resolved.
Configure the IP Address from admin panel
Login your magento admin panel
System->Configuration->General->Web Section Configure the IP Address
to Base URL from Unsecure tab & Secure tab, see below pic.
If this doesn’t help please proceed to other
solutions
Edit Varien.php file
Open Magento installation directory and go to
the ‘app\code\core\Mage\Core\Model\Session\Abstract’ folder.
There open ‘Varien.php’ file with your editor (Adobe
Dreamweaver, Notepad ++ etc).
Depending on your version of Magento the code
can be different so I’ll show you several cases.
In the Varien.php file around 88 lines locate
the code:
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' =>
$cookie->getPath(),
'domain' =>
$cookie->getConfigDomain(),
'secure' =>
$cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
and replace with
/*
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' =>
$cookie->getPath(),
'domain' =>
$cookie->getConfigDomain(),
'secure' =>
$cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);*/
And around
96th lines locate this code:
if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
and replace with
/*
if
(!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
*/
if you have any queries feel free to leave a comment..