Can temporary files of $_SESSION be deleted automatically?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
detrox
Forum Newbie
Posts: 21
Joined: Wed Jun 04, 2003 1:27 am
Location: P.R.China

Can temporary files of $_SESSION be deleted automatically?

Post by detrox »

I found that there are some temporary files in c:\tmp, and can it be deleted automatically by the system or i need to call some functions to do that. :?:

Thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

if these are the session save files you cannot delete them without losing the session.
by default sessions files have names like sess_0751326cb0e59f5abc7d52cb513db1bf and contents like

Code: Select all

node|a:2:{s:9:"traversed";a:5:{i:0;i:3;i:1;i:5;i:2;i:14;i:3;i:39;i:4;i:102;}s:19:"possible_successors";a:4:{i:0;i:95;i:1;i:104;i:2;i:103;i:3;i:129;}}
which is the serialized form of the current $_SESSION array
php should take care of those files on its own.
take a look at http://www.php.net/manual/en/ref.sessio ... axlifetime and http://www.php.net/manual/en/ref.sessio ... robability
User avatar
detrox
Forum Newbie
Posts: 21
Joined: Wed Jun 04, 2003 1:27 am
Location: P.R.China

Post by detrox »

Thanks, volka. I got it.
Post Reply