#20123 [Opn->Fbk]: rewinddir() makes closedir() not working
| From: | derick@php.net | Date: | Sun, 27 Oct 2002 18:46:46 +0000 |
| Subject: | #20123 [Opn->Fbk]: rewinddir() makes closedir() not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-23441@lists.php.net to get a copy of this message | ||
ID: 20123
Updated by: derick@php.net
Reported By: tomasr@centrum.cz
-Status: Open
+Status: Feedback
Bug Type: Directory function related
Operating System: Windows 2000 (NTFS)
PHP Version: 4.2.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2002-10-27 12:42:56] tomasr@centrum.cz
When using rewinddir(), the next closedir() function doesn't release
the directory handle, so the directory is locked forever (I had to
restart web server to be able to delete this directory). I'm using
Windows 2000 on NTFS, PHP 4.2.1 binaries and Apache 1.3.24. Below is a
sample code which generates this error:
"rmdir() failed (Permission denied) in rewinddir.php on line 14"
Thanks,
Tomas Rubringer
tomasr@centrum.cz
<html>
<head>
<title>strange rewinddir()</title>
</head>
<body>
<?php
$dir = "./test";
mkdir($dir, 0777);
$handle = opendir($dir);
rewinddir($handle);
closedir($handle);
rmdir($dir);
?>
</body>
</html>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20123&edit=1