PHP 4.0 Bug #6801 Updated: rmdir fails after an opendir / closedir operation

From: Date: Thu, 21 Sep 2000 11:33:04 +0000
Subject: PHP 4.0 Bug #6801 Updated: rmdir fails after an opendir / closedir operation
Groups: php.dev 
Request: Send a blank email to php-dev+get-33564@lists.php.net to get a copy of this message
ID: 6801 Updated by: sniper Reported By: jeff_schnitter@peoplesoft.com Status: Closed Bug Type: Directory function related Assigned To: Comments: I can not reproduce this. Please try latest CVS or snapshot from http://snaps.php.net and reopen this bug report if problem still exists. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-09-18 03:55:30] jeff_schnitter@peoplesoft.com It seems like closedir is not correctly closing a directory handle. rmdir will fail if you try it after calling opendir and closedir. rmdir works fine if you don't call opendir / closedir. The problem does not occur in 4.0 or 4.0 pl 2. <? // Run this script twice. The first time you run it, // you'll get a failure // that RmDir failed (Permission denied). Run it the // second time and you // can successfully remove the directory. It seems like // closedir might // not be closing the directory. $dummyDir = "test"; if (!is_dir($dummyDir)) { mkdir($dummyDir, 0777); $handle = opendir($dummyDir); closedir($handle); } rmdir($dummyDir); ?> --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6801

« previous php.dev (#33564) next »