php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6232 readdir does not work (it affects garbage collector too)
Submitted: 2000-08-18 06:29 UTC Modified: 2000-09-01 22:05 UTC
From: vikulin at vinco dot ru Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Solaris 2.7 x86
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vikulin at vinco dot ru
New email:
PHP Version: OS:

 

 [2000-08-18 06:29 UTC] vikulin at vinco dot ru
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-01 22:05 UTC] rasmus@php.net
Fixed in CVS
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 09:01:34 2025 UTC