Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: eutychus on March 16, 2014, 09:40:21 AM

Title: Mixed Up Logins
Post by: eutychus on March 16, 2014, 09:40:21 AM
I've been having this problem for a while, but it seems to be getting more and more regular (or maybe my posters are only reporting it more now.)

When goes to the website, they may find themselves logged in as someone else! Clicking on any link will usually correct the problem and they will find that they are now correctly logged in (without having to do a logout and re login).

There also seems to be a problem with people being logged out at inordinate times.

Any ideas?
Title: Re: Mixed Up Logins
Post by: kat on March 16, 2014, 12:22:02 PM
Try renaming the cookie, in Admin>Server settings.
Title: Re: Mixed Up Logins
Post by: NanoSector on March 16, 2014, 04:42:09 PM
Hi eutychus,

Quote from: K@ on March 16, 2014, 12:22:02 PM
Try renaming the cookie, in Admin>Server settings.
While this may resolve this issue, it will also log everyone out of your forum. You might want to inform your users before you do this :)

Also, do you have any mods installed, and if so, which?
Title: Re: Mixed Up Logins
Post by: eutychus on March 17, 2014, 02:47:26 PM
Quote from: K@ on March 16, 2014, 12:22:02 PM
Try renaming the cookie, in Admin>Server settings.

Tried it. The problem still persists.

Relevant information:

Running version SMP v2.0.7
PHP 5.4

No mods installed. I'd like to install some mods, but am a little worried about doing it until I get this problem sorted out.

Attached is a screenshot of my server settings.
Title: Re: Mixed Up Logins
Post by: kat on March 17, 2014, 03:00:26 PM
Try a check in "Enable local storage of cookies".
Title: Re: Mixed Up Logins
Post by: NanoSector on March 17, 2014, 04:05:46 PM
You also might make your cookie name a bit more related to your forum, to avoid any other forum using the same name. Say your  forum is named "Cookies & Co", a name like "CookiesNCo_SMF207" ensures that it is very unlikely for another forum to have the same name :)
Title: Re: Mixed Up Logins
Post by: eutychus on March 17, 2014, 05:59:12 PM
Okay ... trying both suggestions. I'll keep you posted!
Title: Re: Mixed Up Logins
Post by: margarett on March 17, 2014, 06:01:34 PM
Actually there was another user with a similar problem some time ago... If only I could find the topic...
Title: Re: Mixed Up Logins
Post by: eutychus on March 28, 2014, 03:21:25 PM
I've given this two weeks to sort itself out  abit, but it is still happening.

Any ideas?

Once again, here is a screenshot of my current server settings.
Title: Re: Mixed Up Logins
Post by: Lou69 on March 28, 2014, 07:43:21 PM
You don't by chance have WordPress and SMF together do you?

Have you run repair_settings?

http://wiki.simplemachines.org/smf/Repair_settings.php
Title: Re: Mixed Up Logins
Post by: eutychus on March 29, 2014, 07:53:54 AM
Quote from: Lou69 on March 28, 2014, 07:43:21 PM
You don't by chance have WordPress and SMF together do you?

Have you run repair_settings?

http://wiki.simplemachines.org/smf/Repair_settings.php

Nope and yes.
Title: Re: Mixed Up Logins
Post by: eutychus on March 29, 2014, 09:29:02 AM
Let me backtrack on that last question for a minute because there is something that might be germane. I don't have WordPress, but the forum is in a subdirectory of an ASPX application which has it's own independent login system (and the cookies do have different names.) Could there be some sort of conflict there?
Title: Re: Mixed Up Logins
Post by: margarett on March 29, 2014, 08:02:08 PM
If the application doesn't try to take over the all website like WP does, then no, that shouldn't be the cause...
Title: Re: Mixed Up Logins
Post by: eutychus on April 11, 2014, 09:11:54 AM
I think we fixed this issue, but it wasn't a matter of Simple Machines at all.

Apparently some php servers use what is called "output caching" which is supposed to make pages load faster. But it also has the unintended effect of confusing some login systems when two people log in at the same time. Hence, someone "sees" themselves logged in as someone else when they are really not.

I had my hosting company turn off output caching for the site, and the problem has gone away.
Title: Re: Mixed Up Logins
Post by: margarett on April 11, 2014, 09:16:52 AM
Thank you very much for your feedback. This might be very important for similar issues (and I've seen at least one more).
Title: Re: Mixed Up Logins
Post by: kat on April 11, 2014, 10:06:48 AM
Wow! Yeah. Definitely worth trying to remember that one!
Title: Re: Mixed Up Logins
Post by: margarett on April 11, 2014, 10:32:28 AM
Quote from: K@ on April 11, 2014, 10:06:48 AM
Wow! Yeah. Definitely worth trying to remember that one!
I'm compiling an Excel sheet for those important topics :P My memory isn't really what it used to be anymore ;D
Title: Re: Mixed Up Logins
Post by: kat on April 11, 2014, 10:55:38 AM
Now, there's a plan... :)

I tend to have them bookmarked. Trouble is, my bookmarks are getting a bit out of control...