ID: 11062 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Directory function related Operating System: NT 4.0 SP6a PHP Version: 4.0.6 New Comment:
Hi, I have the same problem. I think it may come from rewinddir. I've written a script that first checks is there is at least one file in a given directory. It opens the directory and stores the directory handle into a variable. Further in the same page, the script uses this handle again to gets informations on the files in the directory, so I use rewinddir on it. Then, the function rewind the directory handle but a new one appears (I cheched it with nthandle) Here is a script that I think produces the same effect: <?php $hDir=opendir('c:\web\project1\docs\BCD\Status'); if($hDir){ for($i=0;$i<10;$i++){ while(($file=readdir($hDir))!==false){ echo "$file<br>\n"; } rewinddir($hDir); } closedir($hDir); } ?> then there are still 10 opened handles Previous Comments: ------------------------------------------------------------------------ [2001-11-10 08:43:37] [EMAIL PROTECTED] No feedback. Closing. ------------------------------------------------------------------------ [2001-10-20 20:54:51] [EMAIL PROTECTED] Is this solved by updating IIS ? ------------------------------------------------------------------------ [2001-07-21 18:22:06] [EMAIL PROTECTED] Make sure Windows or any other app has this directory or any files in it locked (using them.) ------------------------------------------------------------------------ [2001-07-03 11:38:02] [EMAIL PROTECTED] Yes, the purpose of the script is to display the contents of a directory and make them available via the IIS server. Unfortunately, I need to make use of the NT security model, so switching to apache is not an option (or I would have, a long time ago). Do you know if this IIS bug was fixed in IIS 5? ------------------------------------------------------------------------ [2001-06-28 19:02:46] [EMAIL PROTECTED] Is there any chance that while testing this you have also caused IIS to serve any of the files in the directories up? There is an unpleasant problem with IIS whereby it holds files open for some time after serving them. This normally manifests itself by stopping you editing and saving out a html file you have just looked at via the web server, however it would also stop you renaming any parent directory of the file. ------------------------------------------------------------------------ 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/11062 -- Edit this bug report at http://bugs.php.net/?id=11062&edit=1