#20123 [NEW]: rewinddir() makes closedir() not working
| From: | tomasr at centrum dot cz | Date: | Sun, 27 Oct 2002 18:42:56 +0000 |
| Subject: | #20123 [NEW]: rewinddir() makes closedir() not working | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-23440@lists.php.net to get a copy of this message | ||
From: tomasr@centrum.cz
Operating system: Windows 2000 (NTFS)
PHP version: 4.2.0
PHP Bug Type: Directory function related
Bug description: rewinddir() makes closedir() not working
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 bug report at http://bugs.php.net/?id=20123&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20123&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20123&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20123&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20123&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20123&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20123&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20123&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20123&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20123&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20123&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20123&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20123&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20123&r=isapi