ID:               22721
 User updated by:  shawn at rumental dot com
 Reported By:      shawn at rumental dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Performance problem
 Operating System: win2k
-PHP Version:      4.3.1
+PHP Version:      4.3.2
 Assigned To:      wez
 New Comment:

afer running file() about a 2000 times with latest snapshot in win2k
running apache 1.3.27 latest win32 binary

i get this error:
Warning: file(e:\test.txt): failed to open stream: Too many open files
in e:\program files\apache group\apache\htdocs\test\testfile2.php on
line 12

I used handle.exe from sysinternals to view open file handles
http://www.sysinternals.com/ntw2k/freeware/handle.shtml

and all file handles opened via file() appear to still be 
open. This is not the case when testing php 422

output from handle.exe:
Apache.exe pid: 1640 MAINFRAME\apache
  1e4: File          E:\test.txt
  1e8: File          E:\test.txt
  210: File          E:\test.txt
  ...  etc
  214: File          E:\test.txt
  
and it goes on for the number of times file() accessed the file.

CODE
----
$i=1;
while($i++ <="2000"){
file("e:\\test.txt");
}


Previous Comments:
------------------------------------------------------------------------

[2003-03-25 18:59:20] [EMAIL PROTECTED]

What is the problem?
We need a script to reproduce the problem, along with a description of
what should happen, what does happen and why you think it is wrong.

------------------------------------------------------------------------

[2003-03-25 18:49:18] shawn at rumental dot com

IS THIS BUG STILL BEING WATCHED.
I reopened it there still seems to be a problem with the fix.

------------------------------------------------------------------------

[2003-03-20 21:04:25] shawn at rumental dot com

BIG PROBLEM!
it seems as though opened files via file()
are staying open and preventing service from openeing new files giving
errors.

I checked this with sysineternals utility called handle

------------------------------------------------------------------------

[2003-03-19 19:11:26] shawn at rumental dot com

Benchmarking PHP 4.3.2-RC
Testing file() with 10 iterations with file size: 4096226
file_test(10): 0.8426 secs

WORKS GREAT !

------------------------------------------------------------------------

[2003-03-18 19:47:18] shawn at rumental dot com

woooaahhh lots of warnings in that compile log.
think ill have to wait.
thx will test tomorrow

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/22721

-- 
Edit this bug report at http://bugs.php.net/?id=22721&edit=1

Reply via email to