PHP disable

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
asela_05085
Forum Newbie
Posts: 16
Joined: Mon Aug 31, 2009 10:33 pm

PHP disable

Post by asela_05085 »

hi all,

previously i was able to disable PHP in folders, because of your support.

the method i followed is put below code in my httpd.conf file

<Directory /var/www/html>
php_flag engine on
</Directory>

<Directory /var/www/html/test>
php_flag engine off
</Directory>


so people can put PHP in "html" folder which is the root folder and they can't put PHP in "test" folder which is under root

but the problem is user can create a new folder under root location and can upload PHP to that.
since PHP is enabled in root location there is no way to disable it for the folders under it unless i figure out those folders and disable manually.

is there a better way to do this ?

or is there a way to represent all the folders under root directory using a while-card or something.

pls help me
asela_05085
Forum Newbie
Posts: 16
Joined: Mon Aug 31, 2009 10:33 pm

Re: PHP disable

Post by asela_05085 »

let me simplify it further

is there a way to disable PHP for folders under a directory and enable for files under that directory
asela_05085
Forum Newbie
Posts: 16
Joined: Mon Aug 31, 2009 10:33 pm

Re: PHP disable

Post by asela_05085 »

thanks McInfo
it really did help me

thanks again :)
Post Reply