Forum Moderators: phranque

Message Too Old, No Replies

Prevent PHP executing in a given directory

Need to stop php executing in directory where files will be uploaded.

         

carneddau

10:11 pm on Dec 7, 2004 (gmt 0)

10+ Year Member



Hi,

I have a feature on one of my sites that allows users to upload pictures for an events calendar type thing.

The uploads are handled with PHP and the script follows all of the security guidelines on php dot net so the wrong kind of files should never end up on the server.

However, I'd like to stop php and any other files from being able to execute in the images directory where these files end up just incase. Might be being a bit paranoid but you can't be too careful with uploads :)

Has anyone else done this? any help would be appreciated.

Thanks

bcolflesh

10:13 pm on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could always CHMOD the directory to remove the execute bit.