Bug #11214 Updated: Strange functionality of opendir/closedir functions?

From: Date: Wed, 03 Jul 2002 14:29:10 +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-12986@lists.php.net to get a copy of this message
 ID:               11214
 Updated by:       sniper@php.net
 Reported By:      rac@whitestein.com
 Status:           Analyzed
 Bug Type:         Directory function related
 Operating System: WIN NT4.0
-PHP Version:      Earlier? Upgrade first!
+PHP Version:      4.3.0-dev


Previous Comments:
------------------------------------------------------------------------

[2002-07-03 06:39:08] sfox@php.net

This appears to be a rewinddir() problem afflicting ntfs only (still
current in 4.3.0 dev).  Looking into it.

------------------------------------------------------------------------

[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



Thread (1 message)

  • sniper@php.net
  • Unknown Message
    • sniper@php.net
« previous php.bugs (#12986) next »