disabling PHP

Discussion in 'PHP' started by asela_05085, Oct 21, 2009.

  1. #1
    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, Oct 21, 2009 IP
  2. asela_05085

    asela_05085 Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    let me simplify this further

    is there a way to disable PHP for folders under a certain directory and enable it for only files.
     
    asela_05085, Oct 21, 2009 IP
  3. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #3
    Maybe something like
    But I don't know if works for folders.
     
    AsHinE, Oct 21, 2009 IP