3

I have scoured the internet but cannot find an answer, and the answers I find are to having Magento locally installed (MAMP/WAMP) etc.

I have installed Magento www.domain.com (1.7.0.2) and also in my developer site www.dev.domain.com. (1.9.0.1)

when I try to login into my admin sites, sometimes I get kicked out automatically. I try to sign in but it loops me back to the login screen. I do not get the red error message 'username/password is wrong'.

I get kicked out from both sites (my www.domain.com and my subdomain www.dev.domain.com)

after clearing my cookies held in my browser (any browser) it allows me to log back in? I can see that the adminhtml cookie is giving me 1 hour expiration. sometimes I get kicked out straight away after logging in?

I can't check Magentocommerce as the website is under maintenance. My domain is hosted on a VPS, installed as Local Server.

please can anyone help?

thanks

4

Check your domain cookie path. If it's a subdomain of the main site (as it looks from your host set up) then you'll get kicked out of one when you log into the other.

http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/system_config/edit/web#session_cookie_management_field_descriptions lists:

The Cookie Domain is mainly used to control whether cookies will be visible in subdomains (e.g. http://subdomain.domain.com/ or not. To ensure that cookies are available in all your subdomains, enter your domain name prefixed with a period.

Simply blank this out to ensure you can log into all of them. Obviously, if you DO want domain cookies to be available to subdomains, you'll need to use a different development domain.

  • Hi, it happens on my main site aswell as the subdomains. I'll edit my question. sorry – Mayur Jun 6 '14 at 13:02
  • That's exactly the point. You're sharing a domain with your subdomains. – Douglas Radburn Jun 6 '14 at 13:05
  • If you have your cookie set up to domain.com and you have domain.com and subdomain1.domain.com and subdomain2.domain.com they're all going to try and use the same domain cookie. – Douglas Radburn Jun 6 '14 at 13:06
  • Ahh, sorry I misread it. what can I do to resolve? – Mayur Jun 6 '14 at 13:20
  • Either use a different domain for your development, or blank out the domain cookie. I'll update my answer now. – Douglas Radburn Jun 6 '14 at 13:31
1

I recently had the same problem and simple trick worked for me. Also this is for people who cannot access the dashboard on Google Chrome. If you can please carry on by working on Mozilla Firefox then please do so because I guess this issue is not persistent on Mozilla firefox.

So the solution for chrome is:

Goto System->Configuration->Web. Expand the Unsecure and Secure tab. Change the Base URL to http://127.0.0.1/[Your folder name] if your using localhost or change it to your Site URL through which you are accessing the frontend. I had to login twice to get the Dashboard since when I entered the details for the first time, it just refreshes and comes back to the same page as you mentioned it as looping. Please try and let me know whether it worked for you too.

0

Just to help, I got a problem like this without using subdomains and I am trying to see if the culprit could be the use of Varnish as a cache. If you use Varnish too maybe you could try to disable it and see what happens.

  • Hi Slamaroa, I don't know what Varnish is, some most likely its disabled. Thanks anyway – Mayur Jun 6 '14 at 13:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.