0

Occasionally I run into a problem logging into the Magento admin panel. The username and password I enter is correct and the url in the browser window tells me that I have logged in correctly (ie: I see domain.com/index.php/admin/areallylongstring), however the login window is displayed again. No error message telling me that the log in details are incorrect is displayed, I am just routed back to the log in window. Has anyone come across this before and can anyone please suggest a solution?

Thanks!

matt
  • 93
  • 1
  • 4
  • 16

2 Answers2

0

Try start a private browser session and see if you can login, if so clear your cookies for the website and you should be able to login.

I occasionally get this problem, next time I get it I will dig into the code with my debugger to see what is actually going on.

jzahedieh
  • 1,570
  • 1
  • 15
  • 27
0

This problem arises due to multiple reasons and the cheapest solution for this will be comment out the following lines in one of core files of magento.

FILE :- app/code/core/Mage/Core/Model/Session/Abstract/Varien.php.

// set session cookie params
session_set_cookie_params(
    $this->getCookie()->getLifetime(),
    $this->getCookie()->getPath()//,
    //dependes which versin of mage you are using, you may comment these as well
    //$this->getCookie()->getDomain(),
    //$this->getCookie()->isSecure(),
    //$this->getCookie()->getHttponly()
);

Find out above code in that file and then comment out those three cookies as shown above.

But as I said it is the cheapest and easiest solution that you can go with. For more information, checkout this link

Community
  • 1
  • 1
Rajeev K Tomy
  • 2,206
  • 1
  • 18
  • 35