Magento enable cookies displayed when you already have cookies enabled

Apr 28, 2011

MagentoThis is a strange problem that has cropped up on Magento sites I have been building a couple of times now. There seem to be plenty of people with a similar problem, so I figured it was worth casting it out onto the Internet in the hope somebody might find it useful.

This only happens on your dev/test server.

Symptom

You have been developing your Magento website using Firefox but when you view it in Chrome or Internet Explorer Magento tells you that you need to enable cookies. First thing you do is check you have cookies enables, clear your existing cookies and try again. Same thing, that’s odd.

Solution

This is so simple I cannot understand why it is still a problem. You are building your site on a test server on your local network and to access the site you simply use the servers name e.g. http://testserver/ . On Firefox this is fine, but on some other browsers the cookies don’t seem to work. I can’t explain it, but it is simple to fix by setting the IP address as the root of your site in your configuration settings and accessing the site through its IP address e.g. http://192.168.1.88/ .

I am sure this won’t solve everybody’s problems but hopefully somebody’s at least. If you have different solutions to the same problem, post them here so we can try to illuminate the dark and dusty world of Magento.