1 (edited by ridgerunner 2010-03-15 15:20)

Topic: Can't login - "Cookie has not been set" - *Solution*

Symptoms/Prerequisites: - You live in the USA or Canada. You are running Windows XP SP2 or older. You do not have Windows Automatic Updates turned on and have not installed all the Windows update patches. You manually set the clock forward one hour (to the correct local time) since the new Daylight Savings Time date: March 8, 2009.

Have you discovered that, just recently you can no longer login to a PunBB 1.3 (or FluxBB 1.3) forum? Do you now get the following message?:

Forum message wrote:

"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."

Did you check to see if cookies were enabled and found that they were already enabled? Is this frustrating to you? This is what I recently experienced and after a bit of research, have found a solution.

User workaround 1: - select the "Log me in automatically each time I visit." checkbox when logging in. This gives a 2-week expiration for cookies which allows you to login with no problem.

User workaround 2: - Leave the Windows local time set one hour slow and let it automatically "Spring Forward" on its pre-programmed date: the 1st Sunday of April (Apr 5, 2009).

Administrator solution: - Forum administrators should set the "Visit Timeout" value to greater than 1 hour - say 1.5 hours = 5400 seconds (default is only 1800 seconds which is too small). And the developers should set the default value higher for future 1.3 software releases.

Description of the problem: - To make a long story short, the problem is related to Daylight Savings Time (DST) and Windows XP users living in locations (such as the USA) where the government has changed the date on which the time change occurs. In the USA the date to "Spring Forward" was changed from the 1st Sunday in April to the 2nd Sunday in March. (We are in this time period right now March 24.) It turns out that Windows XP has a patch to fix this problem that is automatically installed if you have the "automatic updates" turned on. But if you (like me), do NOT have auto updates turned on, you may not have this patch installed. (You can read about this Y2K-like problem and get the DST patch here.)

The login problem only occurs when you (as a good time-keeping citizen) manually set the Windows clock to the correct local time when the time change occurs (the 2nd Sunday in March). The Windows clock becomes effectively one hour fast (with respect to UTC), and the PunBB cookie default "Visit Timeout" expiration time is set to be 1/2 hour (1800 seconds) into the future from the time of login. Thus, cookies are arriving at the browser pre-expired by 1/2 hour and login fails because the cookie is not set. (This behavior occurs with Internet Explorer (version 6 and 7) and Opera (9.x), but does not occur with Firefox (2 and 3))

After April 5, this problem should automatically disappear.

Edit 2010-03-15: - Well, its that time of year again! Same problem, different year.  (see my second post below - post 8). This problem will exist this year from March 14 until April 4, 2010.

Re: Can't login - "Cookie has not been set" - *Solution*

Thanks for reporting. We'll increase the "Visit Timeout" value.

Re: Can't login - "Cookie has not been set" - *Solution*

parpalak i don't think this is the solution .....

it should be fixed in the code by using a time calculation thats independent of daylight saving times, like i suggested here: http://punbb.informer.com/forums/post/122645/#p122645

above are just workarounds for people that have this 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: Can't login - "Cookie has not been set" - *Solution*

As far as I understand the issue described in that topic is connected to the incorrect server time settings. That issue should be solved by a server administrator.

The issue described here is connected to the incorrect client time settings.

Do I miss something?

Re: Can't login - "Cookie has not been set" - *Solution*

Parpalak wrote:

As far as I understand the issue described in that topic is connected to the incorrect server time settings. That issue should be solved by a server administrator.

The issue described here is connected to the incorrect client time settings.

Do I miss something?

well an incorrect time is the same as this problem, here the problem is just related to daylight saving and daylight saving is a time setting smile

also i solved that problem the same way, but its not the way to go ....

~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: Can't login - "Cookie has not been set" - *Solution*

Of course, DST is a time setting smile
I mean where the issue is: at server side or at client side.

The issue described in that topic is the server issue. Is it so?

Re: Can't login - "Cookie has not been set" - *Solution*

i think its server side, all time functions inside punbb should start from gmt and from there on you can go an recalculate the correct time for a specifick user ...

~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.

8 (edited by ridgerunner 2009-03-28 03:23)

Re: Can't login - "Cookie has not been set" - *Solution*

The cause of the problem is most definitely on the client end. In the affected areas (USA, Canada and others), a Windows (XP SP2 or earlier) box without the DST patch gets confused during this short period between the 2nd Sunday in March and the 1st Sunday in April. During this time period, if the local time is manually set correctly (ahead one hour), the internal GMT time (or UTC) is off by one hour into the future. So the Windows clock in the corner displays the right local time, but the internal universal UTC time (which is the time used by the browser when dealing with cookies), is one hour fast. The server is doing everything right. The PunBB forum software is just being too restrictive with the cookie timeout when dealing with computers that (unwittingly) have their clocks set 1 hour too fast. (Or more precisely, any computer that has their internal UTC clocks set "Visit timeout" seconds too fast.)

Note that this problem goes away after April 5 and the PunBB 1.3 forum "Visit timeout" can be set back to 1800 seconds (or whatever) with no ill effect. However, the problem will continue to occur each year, from...

  • 2009-03-08 thru 2009-04-05

  • 2010-03-14 thru 2010-04-04

  • 2011-03-13 thru 2011-04-03

  • 2012-03-11 thru 2012-04-01

  • 2013-03-10 thru 2013-04-07

  • 2014-03-09 thru 2014-04-06

  • 2015-03-08 thru 2015-04-05

p.s. Thank you for acknowledging this as being a problem. And I can see that in response, you have already increased the "Visit timeout" for this site forum to 1 hour (3600 seconds) - Thanks. Unfortunately this is not enough. Now, with my clock set to the correct local time (minus 10 seconds - so my clock is 10 seconds slow), I can login A-Ok, but my session expires in only 10 seconds! The "Visit timeout" needs to be greater than one hour. If you set it to 1.5 hour (5400 seconds), then my session will effectively last 0.5 hour (1800 seconds).

Re: Can't login - "Cookie has not been set" - *Solution*

I think the issue is deeper than just increasing the "Visit timeout". It's related not only to the value of the timeout, but to the method of detection if the timeout has expired.

We'll probably delay considering this issue.

10

Re: Can't login - "Cookie has not been set" - *Solution*

I have same problem, I don't think it is about the server and time clock. Because:
1- I still can not login into my own Punbb, BUT I can login into here. This is drive me more crazy and confused.
2- I have to use FireFox browser, then I can login into my own Punbb.

    Therefore, I still try to search the help from all of you guy. I think main point is some think in the code of Punbb forum. This is only help from who created this fantastic forum Punbb. I like it a lot, fast and simple control. Thank for Punbb.

Re: Can't login - "Cookie has not been set" - *Solution*

simulation credit auto
The topic you guys are discussing is really helpful for me. Thanks so much:lol:

Re: Can't login - "Cookie has not been set" - *Solution*

Thanks a lot for reporting. is this has anything to with "Adjust for DST" opting in the Registration Form???

13

Re: Can't login - "Cookie has not been set" - *Solution*

Thank you, ridgerunner! This is exactly what I need!

Re: Can't login - "Cookie has not been set" - *Solution*

Hello, this is great article. I have blog and I thanks to say you thanks. Regards!

Re: Can't login - "Cookie has not been set" - *Solution*

I have experience the same thing and don't know what to do, I'm glad that there's a thread like this that tackles more about this issue.. smile

Re: Can't login - "Cookie has not been set" - *Solution*

Thank you.

Re: Can't login - "Cookie has not been set" - *Solution*

Please see my post here:
http://punbb.informer.com/forums/post/134104/#p134104

I have this same problem, and have verified all the time functions, and had a hack that appeared to be working for some accounts, but now I've found out that some accounts still can't login.

I can login to my account from my computer, but I can't login to the users account from my own computer.

I think the problem is more than just different time settings on users computers,etc.

Re: Can't login - "Cookie has not been set" - *Solution*

Its that time of year again!
This bug is now in effect and will be until after April 4.

Note that this forum apparently has its Visit timeout set to one hour, but it needs to be longer. (PunBB SysAdmin - Please read posts 1 and 8 again)

Happy Daylight Savings Time everybody!

Re: Can't login - "Cookie has not been set" - *Solution*

Now it's 5400.

Re: Can't login - "Cookie has not been set" - *Solution*

some people in Ireland also have that problem (not just US and Canada). Changing the "Visit timeout" to 6000 seconds did not solve it. I just changed it to 20000.

Sometimes too much to drink is barely enough.
Mark Twain

Re: Can't login - "Cookie has not been set" - *Solution*

I had this same issue on my server, all I did was change the date on the server bios to the correct date and it worked, the issue was a daylight savings time change, not sure about people in a different time zones, I haven't tested it yet

22 (edited by sickboy 2011-06-14 08:02)

Re: Can't login - "Cookie has not been set" - *Solution*

I set the value of 2700 seconds. I think it's enough. smile

big_smile  big_smile  big_smile