1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Excluding using PHP from a specified folder

Discussion in 'Site & Server Administration' started by Yoneh, Mar 5, 2005.

  1. #1
    Is there any way to prevent running a PHP script in a specified directory? I have a folder named kajupe/ in my www root (htdocs), and I want that PHP scripts can't be run in this folder.

    If that isn't possible in any way, is it possible to set that folder in safe mode?

    Thanks in advance!
    -Yoneh
     
    Yoneh, Mar 5, 2005 IP
  2. neterslandreau

    neterslandreau Peon

    Messages:
    279
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm not too sure what you are asking, but here goes a stab..
    Full text here: PHP

    According to the manual, you have to set this in your php.ini file.

    [Note: I've never tried this before. It's purely theoretical.]
     
    neterslandreau, Mar 5, 2005 IP
  3. Yoneh

    Yoneh Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have an own server and I use all rights (non-safe-mode) for me (so that safe mode is off). But I have offered one folder for my friend to use, but I don't want he to run PHP-scripts, I want he use it only for storing files.

    This I mean. But I don't know how to do it? Please could you help me on this?
    Could this maybe be done some way with using virtual directories?

    Thanks again!
     
    Yoneh, Mar 6, 2005 IP
  4. neterslandreau

    neterslandreau Peon

    Messages:
    279
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could create a virtual host with a different document root set with appropriate permissions for your friend. If it's your server, you got the power.
     
    neterslandreau, Mar 7, 2005 IP
  5. Yoneh

    Yoneh Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok, I will try it that way. Hopefully it works.
    Thank you very much for helping me!
    -Yoneh
     
    Yoneh, Mar 8, 2005 IP