RE: [PHP] pls help me :-)
| From: | John W. Holmes | Date: | Sun, 04 May 2003 15:38:50 +0000 |
| Subject: | RE: [PHP] pls help me :-) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146359@lists.php.net to get a copy of this message | ||
> > but i should need something to set my sessions to never to die
> > so instead of using cookies just let the session alive , also when
> closing
> > browser
> >
> > is that possible ?
>
> No.
>
> If you want something permanent use a cookie. You can store an
identity
> token
> in a cookie, and on the server store the data related to that identity
in
> a
> database or something.
If I understand the portion of this question correctly, then yes it's
possible. You can adjust the lifetime of the session cookie to persist
after the browser is closed. So when they return to your site, the
session cookie will still be there and their session will be restored.
Make sure you really need this as you're making it easier for people to
hijack sessions by making the ID persist. Adjust the session cookie
lifetime in php.ini.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/