Thursday 25 July 2013

Magento Admin panel login not working in localhost


Step 1: Copy varien.php file from app\code\core\Mage\Core\Model\Session\Abstract folder
Step 2: Paste into app\code\local\Mage\Core\Model\Session\Abstract folder. Before you paste the file you need to create the folders as specified in this path such as \Mage\Core\Model\Session\Abstract.
Step3: Open varien.php in your favorite editor.
Step4: Find line no 96 and the code will be like



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


     and replace with

if ((isset($cookieParams['domain'])) && !in_array("127.0.0.1", self::getValidatorData())) {
$cookieParams['domain'] = $cookie->getDomain();
}


Step 5: That’s it. Now you will be able to login Magento admin panel.

Monday 22 July 2013

Magento Admin panel login not working in Chrome

Go to /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

Find line no 85 and the code will be like

       // session cookie params

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

and replace with  

       $cookieParams = array(
           'lifetime' => $cookie->getLifetime(),
           'path'     => $cookie->getPath(),
           'domain'   => $cookie->getConfigDomain(),
           'secure'   => $cookie->isSecure(),
         //  'httponly' => $cookie->getHttponly()
       );

That’s it. Now you will be able to login Magento admin panel.