Re: One question about sessions

From: steve (UseLinkToEmail_at_dbForumz.com)
Date: 08/03/04


Date: 3 Aug 2004 13:05:14 -0400


"Jose Correia" wrote:
> Hello, everyone:
>
> I’ve been learning how to use sessions and I’m doing OK,
> so far.
> However, I’ve noticed that the server does not delete the files
> on the
> ’sessiondata’ directory where it stores de data between
> calls unless I
> explicitly destroy the session with session_destroy() (I’ve
> tested Apache
> 1.3.27 and IIS 4).
>
> Question:
> Do I need to be worried about this? I don’t want to write
> scripts that leave
> files after files building up at the server, but I’ve not been
> able to come
> up with a good way to destroy the sessions since the user can
always
> just
> close de browser or type in a new URL and ignore any button or link
I
> put on
> the webpage.
>
> What’s the common practice about this?
>
> Thank you for reading.
> Best regards,
> Jose’ Correia

Jose, sessions automatically destroy themselves after a set amount of
time determined by the server-if no user interaction. So you don’t
have to worry about files staying on the server. Cookies on the
other side, do stay on the server, depending on the amount of life
they have been given. Also if multiple cookies are declared, there
would be multiple files present.

So again, nothing to worry in your case.

-- 
http://www.dbForumz.com/  This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-sessions-ftopict135971.html
Visit Topic URL to contact author (reg. req'd).  Report abuse: http://www.dbForumz.com/eform.php?p=454419