Forum Moderators: coopster

Message Too Old, No Replies

Session problem - Windows

Session files not cleaned out

         

badass101

12:24 pm on Jan 6, 2006 (gmt 0)

10+ Year Member



Hi all,

I'm finding that I have lots of 0kb sess_ files in my session folder for php. There are also quite a few files with data in, which are obviously active sessions.

I'm assuming that the garbage collector is setting these session files to empty, i.e: 0kb, so why are they still residing on the disk?
I keep having to go and clear them out manually, but it takes so long!

What am I missing?

Cheers

Craig

coopster

4:32 pm on Jan 6, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



When you clear out a session or destroy it the file itself does indeed remain in the directory [php.net] with a size of 0 bytes (if I remember correctly). PHP's garbage collection (gc) routine will eventually clean up sessions (delete the files) that have gone beyond the expiration interval but gc only runs according to the settings in the php.ini.