I installed a  fresh copy of Magento v1.3.2.2 on my development box using the installer and Google Chrome. After completing the install, I was unable to login to the Admin Panel through Chrome. It seemed to work fine in Firefox though. Each time I entered the admin username and password, I got sent back to the login page. Upon further investigation, I was unable to create an account or login via the frontend user interfaces either. The frontend would send me to a page indicating that I should turn Cookies on. I took a look at Chrome’s cookie bin and surely enough, there were no cookies being stored for my domain (magento-1.myhost.com). Other sites seemed to work fine.

At this point, I was really unsure what was going on. I found some references online to Magento and Cookies, but nothing to do with Google Chrome. Perhaps my issue was a particular one, but it was repeatable and my problem criteria only partially matched the other problems found online (i.e. the localhost problem). I also found that Google’s diagnostic tools are severely lacking. Unlike Firefox, which has tools like Tamper Data to let users diagnose HTTP Header problems, Chrome had nothing like it.

After a bit of sleuthing, I was able to see that Magento sets the following default cookie parameters if nothing is configured in the Magento Admin Panel:

Cookie Domain: magento-1.myhost.com (it looks up HTTP_HOST)
Cookie Path: /
Cookie Lifetime: 3600

I thought these parameters looked fine, but they were not working for Chrome. On a hunch, I decided to change the Cookie Lifetime from 3600 to 0 to force the browser to only keep the cookie data until the browser is closed.

Magento Admin_1248045898014

Surprisingly, it worked! I have not had time to figure out why this is the case yet, but I don’t have any concerns setting Cookie Lifetime to 0, so it will stay that way for now.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>