Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (Bjab), 25 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 469
Top Posters (30 Days)
Ruben 50
DennyP 24
Gizmo 23
Dunny 15
SteveS 13
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 2 of 2 < 1 2
Topic Options
#26606 - 11/27/00 02:25 PM Re: Cookies vs. Sessions
Anonymous
Unregistered

It can initially recognize you via a cookie though. Sure, the session data is long gone. I'm not arguing that. But the cookie isn't. If it sees the cookie, then you don't have to login, and a new session is started for you. The default value of session.cookie_lifetime is 0, so unless your server admin will make the change for you, or you have access yourself, then yes it'll work exactly as you said. As soon as you close your browser, you'll have to relogin the next time you visit the forum.
Here it is in Scream's own words (from the config.inc.php file):
// Do you want to use sessions or cookies to track your users

// If using sessions and php.ini isn't set to use cookies for sessions

// with a lifetimevalue for session.cookie_lifetime then users will need

// to login upon each visit.

// values = "cookies" or "sessions";

$config['tracking'] = "sessions";
So you see, you CAN use sessions, and not have to relogin each time.
BTW I linked to the wrong forum last time, <a href="http://www.thetechguide.com/forumphp" target="_new">http://www.thetechguide.com/forumphp</a> is the php one.
Top
#26607 - 11/27/00 07:10 PM Re: Cookies vs. Sessions
Anonymous
Unregistered

The cookie that is saved in reference to the session data is a random combo of alphanumeric values. It DOES matter that the session data has been deleted. Obviously you and Scream are both misinformed. Go read the PHP documentation on sessions handling.

Doug

<a href="http://www.netherworldrpg.net" target="_new">http://www.netherworldrpg.net</a>
Top
#26608 - 11/27/00 07:13 PM Re: Cookies vs. Sessions
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Wouldn't be the first time I was misinformed:). Makes sense though since I had to switch over to cookies to make it so users didn't have to login upon each visit.

---

Scream

WWWThreads Developer
Top
#26609 - 11/27/00 07:23 PM Re: Cookies vs. Sessions
Anonymous
Unregistered

Ok, here's what I know. Before I edited session.cookie_lifetime, I had to re-login every time I visited my php forum. Once I set the value to the same that was in my config.inc.php, I didn't have to relogin until a few days passed (the default lifetime was 1036800 seconds btw). Once I changed that value to 31536000 (both in config.inc.php and in the php.ini file) I haven't had to relogin once.

I didn't make any other changes to either the forum itself or the php.ini file. And it recognizes me each time. So if I am wrong here, don't tell my server. At least it believes me and is working the way I think it should <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />
Top
#26610 - 11/28/00 01:31 AM Re: Cookies vs. Sessions
Anonymous
Unregistered

You're not following me. [bold]Because you keep accessing your boards. Everytime you access your boards the timer that is counting down until your session data, which is saved on your server is being reset to it's max setting (those gc_ variables I keep talking about). The limiting reactor in this equation was your cookie expiration time, but now with the long cookie expiration time, your limiting reactor should be your session data expiration time. Don't access your site (not just your boards) for say 2 weeks and we'll see.

Doug
<A HREF="http://www.netherworldrpg.net" target="_new">http://www.netherworldrpg.net</A>
Top
#26611 - 11/29/00 03:41 AM Re: Cookies vs. Sessions
Anonymous
Unregistered

There's no way I can go two weeks without visiting my site! But, it's simple enough to delete everything in my sessions directory. Ok, you're at least partially right, since I had to relogin. But, setting a longer expiration for the cookie still has the desired effect (i.e. I don't have to relogin all the time).

So, if you want to use sessions, but want don't want to have your users login for each visit, just set the cookie lifetime up a bit. As long as the users visit the forum once every couple of days it shouldn't log them out right? And if they don't visit that much, they'll just have to put up with relogging in won't they? <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

I think the BEST thing would be if W3T set a standard cookie and used that to authenticate first. If it recognizes the user, then it automatically starts a session for them. If not, then they're required to login. So, initial login via cookie, subsequent authentication via sessions. Is that possible?
Top
#26612 - 11/29/00 04:09 AM Re: Cookies vs. Sessions
Anonymous
Unregistered

Yes you're right in that aspect, I agreed with you on that a while ago.
As far as that login method you speak of, sure it's possible just going to take a lot of messing with the HTTP Header... I think PHP4 fills the header in reverse... or was that PHP3? I forget now. But that would definately make a difference.

Doug

<a href="http://www.netherworldrpg.net" target="_new">http://www.netherworldrpg.net</a>
Top
Page 2 of 2 < 1 2



Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image