PHP 4.0 Bug #6908 Updated: rmdir fails after using dir()

From: Date: Fri, 19 Jan 2001 02:24:07 +0000
Subject: PHP 4.0 Bug #6908 Updated: rmdir fails after using dir()
Groups: php.dev 
Request: Send a blank email to php-dev+get-44523@lists.php.net to get a copy of this message
ID: 6908 Updated by: sniper Reported By: rene.mueller@datura.ch Old-Status: Open Status: Feedback Bug Type: Directory function related Assigned To: Comments: Does this happen with PHP 4.0.4pl1 ? --Jani Previous Comments: --------------------------------------------------------------------------- [2000-11-20 12:36:39] sniper@php.net reclassify --------------------------------------------------------------------------- [2000-09-27 19:33:19] rene.mueller@datura.ch the following sequence fails at rmdir() with permission denied as long as we uncomment the $d-part. Wa are not very shure if it's a problem of the code somehow or a bug. Thanks for any answers. /* $d = dir( "./temp/sess_".session_id() ); while( $entry = $d->read() ) { if ( $entry != "" && $entry != "." && $entry != ".." ) { $fn = $d->path."/".$entry; unlink( $fn ); } } $d->close(); echo "all files deleted <br>"; */ $canonical_dir = str_replace( "\", "/", $PATH_TRANSLATED ); $canonical_dir = substr( $canonical_dir, 0, strrpos( $canonical_dir, "/" ) ); $canonical_dir = $canonical_dir."/temp/sess_".session_id(); echo "dirname : " . $canonical_dir . "<br>"; rmdir( $canonical_dir ); echo "directory removed <br>"; --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6908

« previous php.dev (#44523) next »