php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5997 rmdir fails to remove specified directory
Submitted: 2000-08-06 20:14 UTC Modified: 2000-09-12 12:20 UTC
From: dpfender at innova dot net Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.1pl2 OS: Windows 2000 Pro, IIS 5.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dpfender at innova dot net
New email:
PHP Version: OS:

 

 [2000-08-06 20:14 UTC] dpfender at innova dot net
At the document root of a web page, create a directory ab using mkdir("ab").
Then create directory ab/cd using mkdir("ab/cd").
Using rmdir("ab/cd") fails to remove directory ab/cd which contains no files.
The binary distribution files were used without modification.
In php.ini, the following changes were made to php.ini-dist:
short_open_tag = Off
extension=php_calendar.dll
extension=php_ldap.dll
extension=php_exif.dll
extension=php_ftp.dll
extension=php_imap.dll
extension=php_mssql70.dll

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-09 21:47 UTC] stas@php.net
failed to reproduce. Could you provide your full script?
 [2000-09-03 07:34 UTC] waldschrott@php.net
Closed due to missing user feedback.
 [2000-09-12 07:36 UTC] waldschrott@php.net
user-feedback:

The following code demonstrates the problem on my system
<HTML> <HEAD> <TITLE>dir test pgm</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080"> <?php
$dir_name = "testdir";
$mk_ret_code = 0;
$rm_ret_code = 0;
$mk_ret_code = mkdir($dir_name, 0775);
echo ("mkdir('${dir_name}', 0775), ret_code = '${mk_ret_code}'<br><br>\n");
$mk_ret_code = rmdir($dir_name);
echo ("rmdir('${dir_name}'), ret_code = '${rm_ret_code}'<br><br>\n");

// attempt to clean up directory with exec()
exec("rmdir ${dir_name}");
?> </BODY> </HTML> Response:
mkdir('testdir', 0775), ret_code = '1'


Warning: RmDir failed (No such file or directory) in
E:\Inetpub\wwwroot\dir_chk\dir_test.php on line 12
rmdir('testdir'), ret_code = '0'

 [2000-09-12 08:08 UTC] waldschrott@php.net
hmmm, well I don?t know what?s actually going on but I?m having various problems, 2 general ones, one related to apachemod (maybe others (ISAPI))...

a) unlink() does not work:
Warning: Unlink failed (Permission denied) in *
b) rmdir() does not work
Warning: RmDir failed (No such file or directory) in *

ApacheModule:
c) exec(rm*) gives an: unable to fork error

 [2000-09-12 12:20 UTC] andi@php.net
The rmdir() problem should be fixed now in the latest CVS. Either grab that or wait for 4.0.3 due soon.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC