|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-09-01 22:05 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 24 12:00:02 2025 UTC |
i was having a hard problem with /tmp being flooded with sess_ files and them not being deleted by garbage collector. when i set gc_probability to something high (99 or 100) server would return 0 length response for any page with php script. i decided to turn off garbage collector by setting probability to 0. it helped the pages to be displayed correctly. then i decided to include my own garbage collector script at the end of every page. it would at a given probability rate scan /tmp for sess_ files older than specified number of seconds and delete it. that's when i meet the same problem again. after shrinking the page to just === $dir = opendir("."); //or every other folder while ($file = readdir($dir)) { //print "<br>$file"; } closedir($dir); === it still would not return any output. would return zero length response. shrinking it to === $dir = opendir("/tmp"); echo "<br>".readdir($dir); echo "<br>".readdir($dir); closedir($dir); === didn't change anything. shrinking it to === $dir = opendir("/tmp"); echo "<br>".readdir($dir); closedir($dir); === finally produced <br>. output. i guess readdir() failure also brokes garbage collector too.