 |
 |
 |
 |
Registered: 06/05/06
Posts: 469
|
|
|
 |
 |
 |
 |
|
 |
 |
 |
 |
#26598 - 11/22/00 10:15 AM
Re: Cookies vs. Sessions
|
|
|
Yes, well what I meant was for using cookies right here, at www.wwthreads.com php forum. When I set my php version up I will choose the cookies option instead of the sessions -there is an option, right? While I dont have it at my site set up yet I wouldnt mind testing it here, but I dont like having to log-in again everytime I come back. Or are you speaking of a user/member prefference? Mateo Byler <A HREF="http://crucedecaminos.com" target="_new"> CruceDeCaminos.com</A>
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#26606 - 11/27/00 02:25 PM
Re: Cookies vs. Sessions
|
|
|
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
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#26611 - 11/29/00 03:41 AM
Re: Cookies vs. Sessions
|
|
|
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
|
|
|
|
|
 |
 |
 |
 |
|
|