When logging in to the admin panel I am redirected to a url such as follows (where is a random value):

To be clear, this occurs after a successful login; as opposed to a failure where the failure count is updated for the user in the admin_user table.

The install I was working with originally had an issue for logging into the admin section. I reset the password and made the following changes to app\code\core\Mage\Core\Model\Session\Abstract\Varien.php:

#1 $cookieParams = array(
#2    'lifetime' => $cookie->getLifetime(),
#3    'path' => $cookie->getPath(),
#4    //'domain' => $cookie->getConfigDomain(),
#5    //'secure' => $cookie->isSecure(),
#6    //'httponly' => $cookie->getHttponly()

#9 if (!$cookieParams['httponly']) {
#10    unset($cookieParams['httponly']);
#11    if (!$cookieParams['secure']) {
#12         unset($cookieParams['secure']);
#13         if (!$cookieParams['domain']) {
#14             unset($cookieParams['domain']);
#15            }
#16    }
#17 }
#19 if (isset($cookieParams['domain'])) {
#20     $cookieParams['domain'] = $cookie->getDomain();
#21 }
#22 */

Where the commented out lines (4 through 6, and 8 through 22) are the changes. These changes are described in numerous sources related to this issue (and similar admin login issues), such as this: :

Magento 1.9 Can’t login to admin panel!

This corrected the issue for a time; and then it reared its head again. I've cleared the file based sessions; var/session. I've cleared the cache; var/cache.

Any tips on solving this?

  • You may check the cookie lifetime and if there's a gap between the server's time and your client's time. – luemic Oct 30 '15 at 19:52
  • I've checked the cookie lifetime and I know that isn't the issue. I've checked the server time and it reports the UTC time correctly, albiet +0 and my timezone is -5. Is this a possible issue or is this taken into account? – Gedalya Oct 30 '15 at 20:20
  • Depends on your cookie lifetime. If it's lower than 18000 than this might be the cause. – luemic Oct 30 '15 at 20:36
  • I changed the cookie lifetime to 18000; cleared the session files and the cache and it did not help. – Gedalya Oct 30 '15 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.