|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11695 rmdir
Submitted: 2001-06-26 08:38 UTC Modified: 2001-06-26 09:03 UTC
From: roman dot kytka at centrum dot cz Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.0.6 OS: Win 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
49 + 41 = ?
Subscribe to this entry?

 [2001-06-26 08:38 UTC] roman dot kytka at centrum dot cz
Please I don?t know if it is a bug or not, but this script works on my friend?s PC and doesn?t on mine. I need to delete dirs and files. Files are deleted from dirs correctly but i cannot delete dirs (older than 2 hours). Please can you help me?
Thanks Roman.
my script:
$default_dir = Dir("C:/mydir/");

    $fullname = $default_dir->path . $name;
    $isdir = is_dir($fullname);
        if ($isdir)
                $create = FileCTime($fullname);
                $act_time = Time();
                $time = $create + 7200;

                if ($time < $act_time
                        $d = dir($fullname);
                        while( $entry = $d->read() )
                              if ( $entry != "" && $entry != "." && $entry != ".." 
                                 $fn = $d->path."/".$entry;
                                 unlink( $fn );
                          rmdir ($fullname);

And result? Here you are...
<b>Warning</b>:  RmDir failed (Permission denied) in <b>C:\Koruna-zal\pokus.php<
/b> on line <b>38</b><br>

My PC is Win2000(fat32), Apache 1.3.x, PHP 4.0.6.
Dirs are created using mkdir ($dir, 0777);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-26 09:03 UTC]
If it works on some other PC but not on yours, it's permissions or something else reading / being in that directory. Anyway, not a bug.

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 19:01:25 2019 UTC