I have two Magento 1.9.0.1 sites. One on example.com
and one on dev.example.com
Production:
Cookie Path: (none)
Cookie Domain: example.com
Development:
Cookie Path: /
Cookie Domain: dev.example.com
I've cleared the /var/session/
directory from the development site, cleared the /var/cache/
directory, and removed any any all *.example.com
cookies from my browser. As soon as I hit the homepage of the development site I get new cookies for both example.com
and dev.example.com
The problem is that this is causing the famous "Can't login on the frontend" bug. Magento is seeing both cookies and cookies it should be reading.
Things I've tried to do to debug:
- Checked Default vs Website vs Store settings. The development server always has
dev.example.com
for it's settings, while the production server always hasexample.com
- Checked the frontend for iframes or other content loading
example.com
fromdev.example.com
Chrome Inspector shows nothing loading the production domain from the development site. - I've also checked the usual stuff, like making sure that the form_key is present, etc. This is definitely an issue of Magento creating a session/cookie using the wrong domain name.