By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,304 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,304 IT Pros & Developers. It's quick & easy.

Cleaning up sessiondata folder...

P: n/a
Hello all,
After enabling sessions for my website I have approx. 785 files in my
sessiondata folder. Now, I know what these are, however, I don't know
when/how is the best way to clean them (besides running a weekly delete
batch file).

Once the users leaves and closes the browser, the session is essential dead,
right ? So, why would I need to keep these files around ? I looked in
PHP.INI but I could not find any "cleaning" settings to remove the files.

Currently, I am only passing a few vars to the session, so they aren't too
big, maybe 12kb.

Should I just setup a delete script ?
Thanks.
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"StinkFinger" <st****@pinky.com> wrote in message
news:10*************@corp.supernews.com...
Hello all,
After enabling sessions for my website I have approx. 785 files in my
sessiondata folder. Now, I know what these are, however, I don't know
when/how is the best way to clean them (besides running a weekly delete
batch file).

Once the users leaves and closes the browser, the session is essential dead, right ? So, why would I need to keep these files around ? I looked in
PHP.INI but I could not find any "cleaning" settings to remove the files.

Currently, I am only passing a few vars to the session, so they aren't too
big, maybe 12kb.


PHP will take care of them eventually. If their temporary presence bugs you
so, you can set session.gc_probability to a higher value (say 50) so that
the garbage is taken out more often.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.