Bug #11214 Updated: Strange functionality of opendir/closedir functions?
| From: | sfox@php.net | Date: | Wed, 03 Jul 2002 10:39:09 +0000 |
| Subject: | Bug #11214 Updated: Strange functionality of opendir/closedir functions? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12962@lists.php.net to get a copy of this message | ||
ID: 11214
Updated by: sfox@php.net
Reported By: rac@whitestein.com
-Status: Open
+Status: Analyzed
Bug Type: Directory function related
Operating System: WIN NT4.0
PHP Version: Earlier? Upgrade first!
New Comment:
This appears to be a rewinddir() problem afflicting ntfs only (still
current in 4.3.0 dev). Looking into it.
Previous Comments:
------------------------------------------------------------------------
[2001-05-31 10:01:01] rac@whitestein.com
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
rmdir( "xxx" );
---------------
Produces permission denied on WIN NT4.0. The command which actually
ends up with permission denied is the rmdir() which should delete the
directory.
Sorry, I did not have time to check it out in new release of PHP (I'm
using 4.0.3pl1) or under LINUX.
The workaround I foud out to be working was this (looks like a problem
of internal management of handles???):
---------------
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
unset( $dh );
rmdir( "xxx" );
------------------------------------------------------------------------
[2001-05-31 10:00:56] rac@whitestein.com
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
rmdir( "xxx" );
---------------
Produces permission denied on WIN NT4.0. The command which actually
ends up with permission denied is the rmdir() which should delete the
directory.
Sorry, I did not have time to check it out in new release of PHP (I'm
using 4.0.3pl1) or under LINUX.
The workaround I foud out to be working was this (looks like a problem
of internal management of handles???):
---------------
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
unset( $dh );
rmdir( "xxx" );
------------------------------------------------------------------------
[2001-05-31 09:58:26] rac@whitestein.com
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
rmdir( "xxx" );
---------------
Produces permission denied on WIN NT4.0. Sorry, I did not have time to
check it out in new release of PHP (I'm using 4.0.3pl1) or under
LINUX.
The workaround I foud out to be working was this (looks like a problem
of internal management of handles???):
---------------
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
unset( $dh );
rmdir( "xxx" );
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11214&edit=1