Magento Admin login problem

0
61
views
Advertisement

I had a new installation of magento. But I was unable to login as an administrator. I went to the admin login page, entered correct username and password but was redirected to the same login page.
Error message is displayed when I enter wrong username or password. But nothing is displayed and I am redirected to the same login page when I insert correct username and password.


luckily i found solutions:


The solution is to modify the core Magento code.
Open app/code/core/Mage/Core/Model/Session/Abstract/Varien.php. Comment out the lines 80 to 83.
The line number may vary according to the Magento version. But these lines are present somewhere near line 80. You have to comment the comma (,) in line:

 $this->getCookie()->getPath()//,   
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()//,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);



In you have Magento 1.4 then you have to comment code from line 86 to 98,

 /* 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();
} */

Well, This was solved my problem, hope, this solution you also…


Cheers,
Mayank Zalavadia:)