View Full Version : disable php engine on a folder and its sub folders ??
orptiin
May 9th 2008, 3:36 am
Hello
I have a VPS, php5 runs as apache mod, for security I want disable php excute on a folder and its sub folders ??? how can I do ?
thanks for your time !
HN
lanmonkey
May 9th 2008, 4:49 am
Hello
I have a VPS, php5 runs as apache mod, for security I want disable php excute on a folder and its sub folders ??? how can I do ?
thanks for your time !
HN
don think you can do that, but you prevent access to any .php file using simple deny rules in htaccess
wmtips
May 9th 2008, 7:04 am
Try to use RemoveHandler (or RemoveType) in .htaccess (http://httpd.apache.org/docs/1.3/mod/mod_mime.html#removehandler)
jestep
May 9th 2008, 7:52 am
Are you trying to disable php exec(), or are you trying to disable php from running on a directory?
exec() can be disabled directly in httpd.conf, or in .htaccess. Php can be disabled using htaccess in the specific directory as wmtips suggested.
orptiin
May 9th 2008, 8:44 pm
some folders need to chmod 777 for users upload images, mp3 , 777 is not secure ??? so I want any php file can not run from these folders .
I am newbie
thanks
jestep
May 12th 2008, 5:17 am
Try chmod 666 or 776 for any of those folders. Test to make sure it works, but this should remove the ability to execute from all the files in that directory.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.