I have installed Magento 1.9. It was working well for a week. Suddenly yesterday, when I tried to log in to the Magento admin panel and I typed username
and password
, clicked the Login button and nothing happened. The page refreshes and that’s all. No error or any other messages.
If I entered the wrong username or password, It shows an error.
After I googled about this issue, I was recommended to comment the following lines in:
app\code\core\Mage\Core\Model\Session\Abstract\Varien.php
/* to solve login issue */
/*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();*/ //I have commented these lines
And for some older versions below was recommended in the same file.
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
//'domain' => $cookie->getConfigDomain()
//'secure' => $cookie->isSecure(),
//'httponly' => $cookie->getHttponly()
);
}*/
Even after that, I could not log in to admin. It is as it was. Did anyone face this issue? Is there any other solution to this issue?
(I tried clearing cache and session through FTP).
app/code/local/Mage/Core..blahblah
for editing so Magento overrides the core file. Also use git for version control, it is a godsend.