homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

cannot delete files via scripting

 11:31 pm on Sep 2, 2004 (gmt 0)

i have just setup a server with PHP and Perl on IIS and i cannot seem to delete files using PHP or Perl, i've used all the ways of unlinking the file but none of them seem to delete the file. I have read/write permission set on the files and the folder. The script i have deletes files successfully from a folder and it works on other servers but it doesnt work on mine. i am assuming i have setup something incorrectly, can anyone please advise me on what can be done.



 11:32 pm on Sep 2, 2004 (gmt 0)


What do the error logs say?



 7:35 pm on Sep 4, 2004 (gmt 0)

what error logs? i dont have no error logs


 2:38 am on Sep 5, 2004 (gmt 0)

we dont need no stinkin error logs!

markfox you should be getting error logs for apahce and possibly seperate ones for php depending on how the server is setup. These are generally very useful when trying to debug errors.


 5:32 pm on Sep 17, 2004 (gmt 0)

i've just checked the errors displayed, i am using IIS not apache. the error seems to be related to Permission Denied. Scripts seem to not be able to delete any files. But they can created files.

This is very strange, i have read/write permission set on that folder.

Can anyone advise me on anything?


 6:34 pm on Sep 17, 2004 (gmt 0)

If you have physical access to the server, you might want to try the following.
1. create a folder on the server with write access available to everyone
2. write a php script to create a file in the new folder
3. run the script
4. check the owner and or creator of the file.
5. make sure that user has read/write access to the folder you are having a problem with.

quick question: what version of IIS are you running?


 2:44 pm on Sep 18, 2004 (gmt 0)


1. Creating a new file depends on the folder permissions, but
2. Deleting a file depends on the "folder permissions" as well as the "file permission"

You prob. need to check the permissions on the file that you want to delete.

If you have time, pls. read an article/tutorial on file permissions. It will prove most helpful in the long run.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved