Hi,
I'm trying to delete a folder from my php script using rmdir, but I keep getting permission denied errors. Creating folders and creating and deleting files within them works perfectly OK, but I can't delete the folders.
I'm using Apache on WinXP and have tried using various solutions I've found in various messages, but nothing works.
I've tried setting partial and Full Control permissions for the Apache user, the Apache group, the IUSR_(machine name), everyone and even turned on the web sharing write permissions at every level from the folder itself right up to the top level on the partition.
All the files in the folder have been deleted before the rmdir, so I don't think that's the problem.
The code I'm using is:
if (!rmdir($strOldDir)):
$strErrMsg = "The old directory couldn't be deleted.";
endif;
$strOldDir contains the full path to the folder.
The error message being produced is:
Warning: rmdir(path-to-folder/help1) [function.rmdir]: Permission denied in path-to-folder\general.fun.php on line 627
I can only think that it's a woods and trees thing and I'm missing something really simple.
Can anyone suggest anything I could try as I've totally run out of ideas.
Thanks.
Debbie-Leigh