0

I am running a Drupal 7 site and am noticing a problem on IE9, when the browser window is closed the user is logged out. We have "remember me" module enabled and the cookie is set to not expire. There is no issue on Chrome or any other browser, you can close browser and when you open it the user is still logged in. I do not not see this problem on any other D7 website I run using this same browser and computer. The host is Blackmesh.

settings.php has $cookie_domain = '.mydomain.com'; I am thinking of changing this to $cookie_domain = 'www.mydomain.com'; as the site always redirects to www this makes sense to me and is what me and my sys admin friend agree on.

One potential solution I am thinking about is setting cookie domain in settings.php $cookie_domain = 'www.mydomain.com';

I am noticing there are some cookies on the site being served from www.my domain and some from .mydomain

I found some threads that seem to have vaguely similar problems.

http://forums.modx.com/thread/76947/ie-login-issue-with-www-vs-non-www-address

https://www.drupal.org/node/280623

5
  • 1
    Have you looked at the fact that the users IE might be set to clear the cookies on close? see: pcworld.com/article/2846020/… Jun 11, 2015 at 16:15
  • As I said in my question this problem is ONLY happening on this site not other sites, so this is not an issue with the browser it is happening only on this site.
    – albo
    Jun 11, 2015 at 16:21
  • settings.php has $cookie_domain = '.mydomain.com'; I am thinking of changing this to $cookie_domain = 'www.mydomain.com'; as the site always redirects to www this makes sense to me and is what me and my sys admin friend agree on.
    – albo
    Jun 11, 2015 at 17:31
  • If the cookie is only used for www then scope it to only that. Regarding the "Remember Me" functionality, have you reviewed blogs.msdn.com/b/ieinternals/archive/2009/09/10/… Jun 14, 2015 at 18:06
  • Dumb Question: Have you tried inspecting the cookie data in IE via the F12 key? Is this what you expect to see? Jun 15, 2015 at 5:20

1 Answer 1

0

There shouldn't be any issue with the cookie domain being .mydomain.com instead of www.mydomain.com because cookies set on the root domain should work properly on any "subdomain" such as www, though it wouldn't hurt to try because it's simple to change.

Depending on the cookie privacy settings in IE, it might be that the cookie is not getting saved for this site if a proper P3P header isn't being sent. For testing I'm pretty sure you could use p3p: CP="CAO PSA OUR" (so in .htaccess put Header set P3P 'CP="CAO PSA OUR"'. I don't know what the correct P3P would be for your case if this is in fact the issue, but this was one that I've seen work for a different "only IE is blocking cookies" issue. You might need to research it a little if this doesn't work.

If this is the issue, then for using it in production make sure it truthfully represents your privacy policy (check out http://www.techrepublic.com/blog/software-engineer/craft-a-p3p-policy-to-make-ie-behave/).

A hint that cookies are being blocked is if you see a privacy eye icon in the status bar (if I recall correctly I think it looks like http://divabradford.org.uk/media/36647/ie_privacy.jpg).

2
  • Edited paragraph 2
    – sa289
    Jun 12, 2015 at 15:37
  • @alex_b Did you end up getting the issue resolved? If so, what ended up being the solution?
    – sa289
    Jun 18, 2015 at 23:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .