#20123 [Com]: rewinddir() makes closedir() not working
| From: | tomasr at centrum dot cz | Date: | Sun, 27 Oct 2002 18:54:48 +0000 |
| Subject: | #20123 [Com]: rewinddir() makes closedir() not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-23442@lists.php.net to get a copy of this message | ||
ID: 20123
Comment by: tomasr@centrum.cz
Reported By: tomasr@centrum.cz
Status: Feedback
Bug Type: Directory function related
Operating System: Windows 2000 (NTFS)
PHP Version: 4.2.0
New Comment:
Yes, thanks, I already tried php4-win32-latest.zip. But, for the
present this snapshot doesn't work with my Apache. So, I replaced the
rewinddir() by the closedir() + opendir() and everything works fine.
Previous Comments:
------------------------------------------------------------------------
[2002-10-27 12:46:46] derick@php.net
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
------------------------------------------------------------------------
[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