steve wrote in message ...
> "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.
Thank you for answering, Steve.
But those session files do stay on the server for a long period of
time, you know?
I've been testing with sessions on PHP for about one month and they
still there. Maybe this is related to the settings on php.ini, I'll
search a bit more on that.
From your answer, however, I'm getting the idea that this is more a
concern for the web server administrator then for the programmers and
therefore I will not spend too much time trying to assure the session
is explicitly destroyed.
Once again, thank you for your answer.
Jose' Correia<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: One question about sessions