Cleaning up sessiondata folder...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • StinkFinger

    Cleaning up sessiondata folder...

    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.


  • Chung Leong

    #2
    Re: Cleaning up sessiondata folder...

    "StinkFinge r" <stinky@pinky.c om> wrote in message
    news:10effkehlc 5ge7b@corp.supe rnews.com...[color=blue]
    > 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[/color]
    dead,[color=blue]
    > 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.[/color]

    PHP will take care of them eventually. If their temporary presence bugs you
    so, you can set session.gc_prob ability to a higher value (say 50) so that
    the garbage is taken out more often.


    Comment

    Working...