php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59438 switching compatibility mode in IE causes users to be logged out
Submitted: 2010-09-24 19:44 UTC Modified: 2013-10-15 11:54 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: pecl at tomfotherby dot com Assigned: pecl at tomfothe (profile)
Status: No Feedback Package: memcache (PECL)
PHP Version: 5.3.2 OS: RHEL 5.5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pecl at tomfotherby dot com
New email:
PHP Version: OS:

 

 [2010-09-24 19:44 UTC] pecl at tomfotherby dot com
Description:
------------
On our website, we store user sessions in memcached using the PHP memcache client by setting the following in the php.ini config:

session.save_handler = memcache

Things work fine however, I have noticed that when using IE8 on Windows Vista, if I toggle compatibility mode while logged into the website, I get logged out, i.e the session is lost.

Anyone know the reason for this. Is it a bug? or a config issue on our part?


Also, see: http://webmasters.stackexchange.com/questions/3053/why-are-users-logged-out-when-they-toggle-compatibility-mode-in-ie

We are using memcache-3.0.3 on RHEL 5.5 using PHP 5.3.2.

Reproduce code:
---------------
n/a

Expected result:
----------------
n/a

Actual result:
--------------
n/a

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-27 09:31 UTC] hradtke@php.net
Does IE8 change the session id when switching to compatibility mode?  This would produce the behavior you are experiences.
 [2010-09-29 02:41 UTC] pecl at tomfotherby dot com
> Does IE8 change the session id when switching to 
compatibility mode?

No. Having tested this, the VALUE for cookie named PHPSESSID 
was the same before and after toggling compatibility mode 
but the users session data was cleared (i.e. the user was 
logged out).

Is the PHP memcache client session mechanism tied to the 
browser's user agent string in any way?
 [2010-09-29 09:31 UTC] hradtke@php.net
Nothing is tied to the users browser agent.  Does the user get logged out when using the standard session save handler?
 [2010-09-29 11:17 UTC] pecl at tomfotherby dot com
> Does the user get logged out when using the standard 
session save handler?

No, if I switch to using files for session storage, toggling 
compatibility mode doesn't cause a logout. However, I'm not 
exactly comparing like for like because I can only test this 
on dev which is a bit different from production.

It may be worth mentioning that we have redundancy and 
failover support switched on on prod:

memcache.hash_strategy = consistent
memcache.allow_failover = 1
memcache.session_redundancy=2
session.save_path="tcp://192.168.0.1:11211, 
tcp://192.168.0.2:11211"

For more details about the config see my blog post:
http://www.bitvolution.com/session-sharing-in-php-the-easy-
way
 [2011-03-14 01:26 UTC] hradtke@php.net
There have been reports that the session_redundancy setting has a problem.  Please try updating the following as a test to see if the resolves it:
memcache.session_redundancy=3
 [2011-03-14 02:32 UTC] pecl at tomfotherby dot com
I opened /etc/php.d/memcache.ini and changed

memcache.session_redundancy=2
to 
memcache.session_redundancy=3

and restarted Apache. I Logged in to our website and toggled 
compatibility mode in IE8 - Unfortunately, no luck - the 
session was still lost and my user was logged out.
 [2011-03-14 07:33 UTC] hradtke@php.net
Thanks for the quick response.  Can we try one more setting change?  memcache.allow_failover = 0
 [2011-03-17 01:12 UTC] pecl at tomfotherby dot com
I opened /etc/php.d/memcache.ini and changed

memcache.allow_failover=1
to 
memcache.allow_failover=0

and restarted Apache. I Logged in to our website and toggled 
compatibility mode in IE8 - Unfortunately, no luck - the 
session was still lost and my user was logged out. Note: I 
didn't restart memcached in between the config change 
(because then our website users would be logged out) - let 
me know if a memcached restart is needed as well as a Apache 
restart.
 [2013-05-29 11:25 UTC] maarten@php.net
Please try to reduce the amount of differences between your testing and production environments. I.e. create a test env with multiple frontends and failover.

I'd guess the problem exists in the code/config of your production system, not memcache, so please try to reproduce it or dig deeper.
 [2013-05-29 11:25 UTC] maarten@php.net
-Status: Assigned +Status: Feedback -Assigned To: hradtke +Assigned To: pecl at tomfothe
 [2013-10-15 11:54 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 02:01:27 2024 UTC