ID: 42948 User updated by: develar at gmail dot com Reported By: develar at gmail dot com -Status: Feedback +Status: Closed Bug Type: SPL related Operating System: Windows XP SP2 PHP Version: 5.2.4 New Comment:
Big thanks. I unset($SplFileInfo); and it works. It is a little difficult to guess, but it is logically correct. This is bogus, excuse me :) Previous Comments: ------------------------------------------------------------------------ [2007-10-12 17:06:17] [EMAIL PROTECTED] Why are you mixing Unix and Windows paths and please try unsetting $SplFileInfo, too. ------------------------------------------------------------------------ [2007-10-12 12:59:56] develar at gmail dot com Description: ------------ I can't delete directory after use DirectoryIterator. I read http://bugs.php.net/bug.php?id=35997 Reproduce code: --------------- <?php $root_dir_pathname = '/tmp/' . mt_rand(); mkdir($root_dir_pathname); $DirectoryIterator = new DirectoryIterator($root_dir_pathname); foreach ($DirectoryIterator as $SplFileInfo) { } unset($DirectoryIterator); rmdir($root_dir_pathname); ?> Expected result: ---------------- no error Actual result: -------------- Warning: rmdir(/tmp/49058378) [function.rmdir]: Permission denied in C:\home\test\www\test.php on line 11 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42948&edit=1