Topic: Users reporting logging in problem

Since the upgrade to 1.3 I'm getting lots of people complaining about being logged out several times per day. They claim to be ticking the "stay logged in" checkbox but they still keep getting booted.

This is a common complain since 1.3 and I never had a complaint like this using 1.2. Hope this helps.

Re: Users reporting logging in problem

Here is a message I received today from a regular forum member

When I log in and write a post then come to submit it I find that I have been logged out, so I have to copy my post and log in again. paste my post and submit it as quickly as I can otherwise I will be logged out again.

Re: Users reporting logging in problem

I had sometimes this problem on 1.2.
Here on 1.3 when I am refreshing the forum it sometimes says that I am not logged in.
You can click on Log me In or elsewhere and it says back you are logged in.

Re: Users reporting logging in problem

Could you give us a link to your site?

5 (edited by Reactor 2008-12-22 07:22)

Re: Users reporting logging in problem

My site: http://www.pcmod.pl
Make an account, use automatic login function (save password).
Refresh the page then close the window you have to wait some (go drink a cofee) time (maybe it its a time when you are online). Open my site again.
See that you are not logged in, you have to click somewhere to be logged in.

Ah, forgot about language:
Zarejestruj - Register
Zaloguj - Login

Re: Users reporting logging in problem

The below quote is from a user at www.eRoyton.co.uk/forum
Feel free to register and test

esupergood wrote:

Here is a message I received today from a regular forum member

When I log in and write a post then come to submit it I find that I have been logged out, so I have to copy my post and log in again. paste my post and submit it as quickly as I can otherwise I will be logged out again.

Re: Users reporting logging in problem

I've just had another user phoning me up angry that he can't login. He's on internet explorer and is being told that he has logged in but the cookie has not been set. And yes, he has cookies enabled.

Re: Users reporting logging in problem

Reactor, I registered at your site and did everything you had written step by step. It worked fine for me. I found 2 cookies set at your site: punbb_cookie, expires at Tue, 06 Jan 2009 08:17:58 GMT; PHPSESSID, expires at end of session. Do you use sessions at your site?

Re: Users reporting logging in problem

I dont know, just got default settings.
I am going to check it on Firefox, or IE. Currently I am using Opera. (I think that no difference)
I have 3 cookies: PHPSESSID, punbb_cookie, punbb_cookie_track when I am logged in.
I am going to check how its with cookies when I am logged in, but when the bug occurs and it says I am not logged in.

10

Re: Users reporting logging in problem

Cookie path?

Re: Users reporting logging in problem

When I have this problem I have only punbb_cookie. There was no PHPSESSID.
One click somwhere on forum and I have PHPSESSID also. There is no date of exp of PHPSESSID.
I dont know why know I dont have punbb_cookie_track

12 (edited by esupergood 2008-12-24 09:11)

Re: Users reporting logging in problem

My users are still complaining. Please feel free to register and test at www.eroyton.co.uk/forum

Here is a complain I got this morning:

It Stinks I post or reply to a post and then submit only to find I am logged out and so I have to copy my reply or post, then logging in again post and submit. Like I said it stinks no wonder there arnt many post these days.
                                                                 Regards Lucky Jim

and another from this morning:

Hello Lucky Jim the same thing happens to me all the time I have done the keep me logged in thing it makes no difference.
does it depend on the way you hold your mouth.:rolleyes:

Any tips?
I don't know how cookies work or how to check/reset them.
Any help very much appreciated.

Thanks
Mark

13

Re: Users reporting logging in problem

This never happens to me... I think I've been logged in to this forum for weeks already (same thing with my local PunBB).

Re: Users reporting logging in problem

I have just tried logging into my forum using my parent's computer and this is the message I got when I did not press "remember me":

You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website.

I was NOT logged in successfully.
I had to try again and click "remember me" before it would work.
But many of my users say that they can't login even when they tick "remember me".

sad

15

Re: Users reporting logging in problem

Hi, I have exactly the same problem as esupergood's users. It's quite an issue, because 1/3 of users can't log in. I tried logging in on computer of one of those users and both opera and ie weren't working. However, firefox portable did.

Is there a known solution?

16 (edited by Cereal 2009-01-11 16:24)

Re: Users reporting logging in problem

I had exactly the same problem at my forum smile

i think i found the problem

my server is in GMT+1 timezone
my webbrowser is in GMT + 9 timezone

the timestamp thats set as the expire time is 1231694940 (Sun, 11 Jan 2009 17:29:00 GMT)
the timestamp thats used at the browsers end is 1231723740 (Mon, 12 Jan 2009 01:29:00 GMT)

so i think this is a timezone problem ...

the problem is that phps time() function is using systems local time and not GMT time ...
a solution could be to use gmdate('U') to generate the base timestamp for the cookie time.

currently i can't test this, but i will test it tomorow smile

ah, and why does this only happen when the remember me is not checked? well if remember me is checked the expire time is big enough to supress the timezone problem.

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: Users reporting logging in problem

Hi Cereal
Thanks for your idea. It sounds good to me.
Did you manage to test it and figure out a solution?
I look forward to your results smile

18

Re: Users reporting logging in problem

well teh solution could be to change all the time() functions for a cookie to gmdate('u')

but didn't test it yet

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: Users reporting logging in problem

Cool. I have no idea how to that kind of thing so if you do find a solution I'd appreciate it if you could post back with an idiot's guide to fixing that problem. It's causing big problems. I had to go around to a forum member's house last night to try and get him logged in. Firefox would not let him login so we had to ditch that and download/install Opera. That fixed it for him, but other users still can't login. I have 300 users, I can't go round to all their houses smile

20

Re: Users reporting logging in problem

if you had a lot of female users it would be a good thing big_smile

21

Re: Users reporting logging in problem

well the basic problem with this is that i need diff users in diff timezones to test it smile

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: Users reporting logging in problem

I'm in GMT0
If you need me to register on your forum let me know.

Re: Users reporting logging in problem

smile

24

Re: Users reporting logging in problem

i need people in japan, india to test smile

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

25

Re: Users reporting logging in problem

I had the same problem too, and I implemented a hack which forces the "Remember me" functionality to take over, so users remain logged in for longer. This at least solves the problems of cookies not being set or expiring immediately.

My hack is as follows:

on line 32 of login.php, change:

$save_pass = isset($_POST['save_pass']);

to

//$save_pass = isset($_POST['save_pass']);
$save_pass = true;

IE users can now at least log in (I never saw the problem in firefox).