Issue: You can’t login to the Magento admin panel on localhost using Google Chrome Browser.
This issue still happens in Magento CE 1.8, and below you will find the fix.
1. Find Varien.php
Edit /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
2. Find the code in Varien.php
Find the code around lines 87 through 94 (in Magento CE 1.8). It should look like the following:
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
3. Comment out the code
Comment it out using the PHP comment tags of /* and */. Your new code should look like the following.
// session cookie params
/* $cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
); */
4. Save the file and login again
Save Varien.php and try logging in to the Magento admin panel again. This should fix any issues you have with using Chrome to login to your localhost installation of Magento.