Admin Login Not Working in Google Chrome

when we enter the correct username and password on the Magento Backend login screen it simply returns back to the same screen. There is the problem with session cookie with the chrome browser.

  • Go to file path location:

    app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

  • Go to file path location:

    app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

Step 1

Open file,

Varien

Step 2

Find session cookie params text if text not found then you line number 87:

  1. // session cookie params  
  2. /* $cookieParams = array( 
  3. 'lifetime' => $cookie->getLifetime(), 
  4. 'path' => $cookie->getPath(), 
  5. 'domain' => $cookie->getConfigDomain(), 
  6. 'secure' => $cookie->isSecure(), 
  7. 'httponly' => $cookie->getHttponly() 
  8. ); 

  9. if (!$cookieParams['httponly'])
  10. { 
  11.       unset($cookieParams['httponly']); 
  12.       if (!$cookieParams['secure'])
  13.       { 
  14.             unset($cookieParams['secure']); 
  15.             if (!$cookieParams['domain'])
  16.             { 
  17.                   unset($cookieParams['domain']); 
  18.             } 
  19.       } 
  20. }*/  
Comment code, below explain:

Comment code

Now try to login with your credentials to logged in.