Previous Thread
Next Thread
Print Thread
Hop To
#254570 01/09/2014 8:22 PM
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Since we upgraded to 7.5.8 some of my users are complaining that their cookies don't seem to be working consistently.... Specifically, they need to log in every 3 or 4 days when previously they could go for 4 or 5 weeks without logging in.

Some of them have tested and rebooting doesn't seem to affect it. Also, it seems to be happening with all browsers and all versions of Windows...

Is there something that might be expiring the cookies sooner?

Or any other ideas? Thanks!!
confused


--BIll B
Joined: Jun 2006
Posts: 16,275
Likes: 114
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,275
Likes: 114
It's due to the IE issue where a largely fictitious date would not be valid; as a "fix" the cookie date is set as 7 days (ie the cookie will be invalid after this date). Myself I think a month would have been a better value.

You can change this, but it wouldn't be supported and you'd have to edit coding to be a different value.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Okay.. I "almost" understood that.... and it did trigger my memory...

I vaguely remember it as a new IE "feature". I even asked some of the guys to try other browsers and they responded that it occurs with them too. But that can't be correct -- Right?

Also, previously I did zero in on the reset cycle.... while nobody fessed up to being that attentive, based upon their emails to me, I did detect that it was occurring about once a week to the guys.

What did you mean about the largely fictitious date? Did you mean one that was set for 5 years - for example?

And then, "Who's fix" are you referring to? Microsoft or UBB?

Did we go from "Never Expire" to "Expire in 7 days"??


--BIll B
Joined: Jun 2006
Posts: 16,275
Likes: 114
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,275
Likes: 114
Yes, IE does not like a far off date as the cookie expire time.

The "fix" was to set the ubb cookie to expire after 7 days; why 7 days was chosen over say 30 days is beyond me.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
So what's the optimal cookie time setting for 7.5.7?

Bill B #254578 01/10/2014 10:56 AM
Joined: Jun 2006
Posts: 16,275
Likes: 114
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,275
Likes: 114
Personally a month seems like a good number; anything shorter and you end up with emails about users "getting 'kicked off' the forums" (I get several a month too; i have to explain that they just need to login, then again i have to do it repeatedly lol).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
A very high percentage of my users have to use IE variants.
Do other forum products suffer in the same way, I wonder? confused

driv #254581 01/10/2014 3:33 PM
Joined: Jun 2006
Posts: 16,275
Likes: 114
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,275
Likes: 114
Originally Posted by driv
A very high percentage of my users have to use IE variants.
Do other forum products suffer in the same way, I wonder? confused
Well, their cookie length was a lot shorter than what we where using (who needs to be logged in a full year?)


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Bill B #254585 01/11/2014 12:07 AM
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
If I use this Freeware and reset the EXPIRES date to a month, shouldn't that fix the problem for a single person?

http://www.nirsoft.net/utils/iecookies.html



--BIll B
Gizmo #254631 01/15/2014 12:03 PM
Joined: Jun 2006
Posts: 28
S
newbie
newbie
S Offline
Joined: Jun 2006
Posts: 28
Originally Posted by Gizmo
It's due to the IE issue where a largely fictitious date would not be valid; as a "fix" the cookie date is set as 7 days (ie the cookie will be invalid after this date). Myself I think a month would have been a better value.

You can change this, but it wouldn't be supported and you'd have to edit coding to be a different value.


Not sure what you are referring to here about 7. I checked the code, and the cookie is set as time() + COOKIE_LIFETIME, which is set in config.inc.php. It is set by default to a very large number.

Some of my IE users have been having issues too. Should I change the value of COOKIE_LIFETIME? And if so, what its the greatest possible value that will keep IE happy?

Bill B #254637 01/15/2014 12:52 PM
Joined: Jun 2006
Posts: 28
S
newbie
newbie
S Offline
Joined: Jun 2006
Posts: 28
I traced through the code and it does override COOKIE_LIFETIME to a max of 7 days. Wow. There's no way such a low value makes sense. People don't want to be logging in every 7 days. And having it stealthily override COOKIE_LIFETIME is going to cause a lot of confusion in the future. ex: "But my cookie lifetime says 25353226226. Why is it expiring in 7 days?"

Does anyone know precisely what bug/problem this change was made to fix, and why 7 is the maximum? I would be very surprised if Internet Explorer allows a maximum of 7 day cookies. That just doesn't make any sense.

And if there is some set limit, wouldn't it make sense to override COOKIE_LIFETIME only for IE?

Last edited by Snarf; 01/15/2014 1:08 PM.
Joined: Jun 2006
Posts: 16,275
Likes: 114
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,275
Likes: 114
The bug was the IE login issue; I believe a fix of 30 days would have been sufficient, I have no idea why 7 days was enforced as a maximum...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 28
S
newbie
newbie
S Offline
Joined: Jun 2006
Posts: 28
I've changed ours to 70 days. Don't see why 7 would work but 30 or 70 or 100 wouldn't. Can't find any web articles mentioning a 7 day limit on IE.

Or might as well set it to "0" if you want then never to expire. Surely that would work under IE.

Last edited by Snarf; 01/15/2014 3:59 PM.
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Can you give me a hint WHERE I go to mess with the time limit?


--BIll B
Joined: Jun 2006
Posts: 28
S
newbie
newbie
S Offline
Joined: Jun 2006
Posts: 28
From the changelog:

Default cookie expiration is now 1 week (7 days) versus 1 year (365 days; changebasic.inc.php, html.inc.php, admin/loginas.php)

Joined: Apr 2004
Posts: 1,944
Likes: 144
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,944
Likes: 144
Originally Posted by Bill B
Can you give me a hint WHERE I go to mess with the time limit?

in \libs\html.inc.php
find:
Code
if (!isset($config['COOKIE_LIFETIME'])) $config['COOKIE_LIFETIME'] = 604800;
if ($config['COOKIE_LIFETIME'] > 604800) $config['COOKIE_LIFETIME'] = 604800;

replace with:
Code
if (!isset($config['COOKIE_LIFETIME'])) $config['COOKIE_LIFETIME'] = 604800;
if ($config['COOKIE_LIFETIME'] > 2592000) $config['COOKIE_LIFETIME'] = 2592000;

86400 = 24hrs
604800 = 7 days (Default for UBBT 7.5.8)
2592000 = 30 days (What Gizmo and I both recommend)
31536000 = 365 days (Default for UBBT 7.5.7 and prior)

Then, go to:
Control Panel > Primary Settings > Advanced Options
Edit "Cookie Expiration Time:" to whatever you want, but the max will be no more than what you've just modified html.inc.php to be.

Last edited by id242; 01/17/2014 1:27 PM.

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Fantastic....

Okay, I followed the instructions -- but I changed the Cookie Expirations to 30 days in ALL THREE files.
/forum/scripts/changebasic.inc.php
/forum/libs/html.inc.php
/forum/admin/loginas.php

Now, let the 1 million monkeys begin typing!!! :-)

PS. Thanks id242 Your instructions were perfect.


--BIll B
Bill B #254824 02/13/2014 11:34 AM
Joined: Dec 2003
Posts: 6,551
Likes: 76
Joined: Dec 2003
Posts: 6,551
Likes: 76
Kinda makes you wonder why we even have a option in the control panel if it is hardcoded to set it to a max 7 days no matter what you enter.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Bill B #254825 02/13/2014 12:09 PM
Joined: Apr 2004
Posts: 1,944
Likes: 144
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,944
Likes: 144
Hard-coded as a cookie expiration MAXIMUM.

You can still adjust it to 15 minutes, 1 hour, 1 day, or whatever.
As long as you know the maximum cookie expiration time allowed is 1 week smile

I'm registered with a few sites that have it set to 20 minutes. Very annoying when you're trying to contribute a long post, one that requires research, and you are told that you're not logged in when you go to hit that "Submit" button.

I'm also registered with a few sites that allow you to change the cookie expiration time in your profile settings from "1 hour" / "1 day" / "1 week" / "30 days"... letting the user choose whats best for them. The board default setting is whatever the admin choose in the control panel -- similar to how we currently have a posts-per-page default that can be modified in each user's profile page.


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Bill B #254826 02/13/2014 12:32 PM
Joined: Dec 2003
Posts: 6,551
Likes: 76
Joined: Dec 2003
Posts: 6,551
Likes: 76
I think I did say max.

But there is no notation that if you set it to null sec. it will be 7 days.
If you set it to 31536000 it will again default to a max of 7 days.
Only if you use a value between 0-604800 will it allow it to be 7 days or less.
Of course. a value of say 0-1 would probably render the site useless unless they allow guests to post.

But bottom line is if I elect 31536000 and submit, the control panel still displays 31536000 and 31536000 is saved in config.ini.php. but is hardcoded to limit the duration to 604800(7days). Leading users to think they have in fact changed the cookie duration to 365 days where it really did not happen.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
UBB 20 Years button
by Morgan - 02/20/2024 4:21 PM
Attachment/Cloudflar
e issue

by Morgan - 02/15/2024 5:47 AM
Forums down
by Nightcrawler - 02/14/2024 2:31 PM
How is this possible?
by Baldeagle - 02/08/2024 2:49 PM
Error Logs
by Outdoorking - 02/03/2024 9:41 PM
Who's Online Now
1 members (Morgan), 210 guests, and 356 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)