PHP 4.0 Bug #6232: readdir does not work (it affects garbage collector too)

From: Date: Fri, 18 Aug 2000 10:29:19 +0000
Subject: PHP 4.0 Bug #6232: readdir does not work (it affects garbage collector too)
Groups: php.dev 
Request: Send a blank email to php-dev+get-29381@lists.php.net to get a copy of this message
From: vikulin@vinco.ru Operating system: Solaris 2.7 x86 PHP version: 4.0.1pl2 PHP Bug Type: Misbehaving function Bug description: readdir does not work (it affects garbage collector too) 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.

« previous php.dev (#29381) next »