Bluehost.com Web Hosting $6.95

RE: [PHP] session experation

This is a discussion on RE: [PHP] session experation within the PHP General forums, part of the PHP Programming Forums category; Sam, There is a way to keep a session active beyond the death of the browser, but the odds are ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-10-2003
Warren Vail
 
Posts: n/a
Default RE: [PHP] session experation

Sam,

There is a way to keep a session active beyond the death of the browser, but the odds are that this will not do exactly what you want either, since killing the session on browser close is the customary setting.

In my case I expected closing the browser to kill the session (or more correctly cause the browser to drop the cookie for the session ID). php.ini parameter session.cookie_lifetime was set to a value other than zero, and my sessions remained active even after the browser was closed (probably had other things going on as well), so that opening a new browser picked up the same session key (not too cool for my app) ;-).

I'm not sure you want to deal with other aspects of this, like manually opening a new browser and using the session key (same cookie) of a browser already open? Just be careful.

Warren Vail

-----Original Message-----
From: Daniel Guerrier [mailto:dan_guerrier@yahoo.com]
Sent: Thursday, October 09, 2003 1:23 PM
To: php-general@lists.php.net
Subject: Re: [php] session experation


The session will die on browser close. What you are
asking for is how to use cookies.
You can set a cookie and use the information in that
to determine user functionality

http://us2.php.net/manual/en/function.setcookie.php

--- Sam Folk-Williams <sfolkwilliams@mn.rr.com> wrote:
> Hi,
>
> I want to extend the length of a session based on
> the existance of a
> variable beyond the closing of the browser.
> Basically, I've got a restricted
> intranet where staff have to log-in and I want to
> add a "remember me"
> option. If they check off the remember me box, then
> the session will be set
> to expire in one year instead of as soon as the
> browser closes. Is there a
> way to do this without altering the php.ini file?
> (I'm in a shared hosting
> env and don't think I can alter that file).
>
> Or, is there a better way to acheive this result?
>
> Thanks,
>
> Sam
>
> --
> Sam Folk-Williams
> Service Team Leader/Webmaster
> Rise, Inc -- Creative Partnerships South
> (952) 884 8330 (V); (952) 884 8371 (F)
> www.rise.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:23 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0