Skip to main content

Why is Garbage Collection Disabled in PHP INI?

Comments

2 comments

  • cPRex Jurassic Moderator

    Hey there!  I checked a clean cPanel system and I see the defaults you mentioned on my machine, so I think your guess of "it was changed at some point in the past" is the most likely answer.

    0
  • quietFinn

    session.gc_probability=0 and session.gc_divisor=0 in all servers I checked.

    I never touched those settings.

    You can do:
    grep "session.gc_probability" /opt/cpanel/ea-*/root/etc/*.ini | grep -v ";"
    and 
    grep "session.gc_divisor" /opt/cpanel/ea-*/root/etc/*.ini | grep -v ";"

    If you look in /usr/local/cpanel/scripts/clean_user_php_sessions you see:
    "We only remove files with session.save_path that contain /sess_.*/ by default."

     

    0

Please sign in to leave a comment.