Magento Can’t Login Into Admin Panel In Latest Version And Old Version

Posted by Ankur Gandhi in Magento



magento logo Magento Cant Login Into Admin Panel In Latest Version And Old VersionHello Friends, Magento is an open-source ecommerce web application.It was created by Varien, building on components of the Zend Framework. Magento is well architected and well designed ecommerce platform. So after hearding so many advantages of Magento and after getting one project in Magento I got one chance to work with Magento. So I downloaded it and install it in my local. After installing Magento in local I tried to login into admin but I was not able to login in Magento admin. First I thought that I entered wrong username/password but it was not giving any error like ‘Invalid Username and Password.’, So it means there is some problem while loggin into admin of Magento. I searched about his problem and found solutions for this which are explaining below.

1. If you are using latest version of Magento : If you are using latest version 1.4.1.1 then you have to follow these steps to log in into admin.
- Open magento\app\code\core\Mage\Core\Model\Session\Abstract\Varien.php file and go to line number 96.

- You will see piece of code like shown below :

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

- Just replace it with code given below :
if (isset($cookieParams['domain']) || 1 == 1) {
$cookieParams['domain'] = $cookie->getDomain();
}

- Save file.

- Now try to log in into admin. Voila!! Now it is working.

2. If you are using older version than 1.4.1.1 version : If you are using older version then you have to follow these steps to log in into admin.

- Open magento\app\code\core\Mage\Core\Model\Session\Abstract\Varien.php file.

- Find code given below in this file :

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()

- Replace this code with code given below :

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()

- Save File.

- Now try to log in into admin. Voila!! Now it is working.

So these are the two ways for old version and new version by which we can solve problem of can’t login into admin of Magento. Let me know if you have any other solution or any other suggestions for Magento can’t login into admin problem.

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

  • Glubomirg

    it does´t work. I have Magento 1.4.1.1

    • http://Enteryourwebsite... hiro

      metoo(latest ver.)…

  • hiro

    metoo(latest ver.)…

  • CKGO

    any ideas on how to improve the speed,,,it’s so slow!

  • Philipjterry

    Thank you I did precisely this but no joy…. What does this piece of code actually mean?

  • http://www.mactonweb.com/ Web design London

    Nice idea.Thanks for sharing it..!

  • Pingback: Biogas

  • Pingback: Biogas Software