The Community Forums

Interact with an entire community of cPanel & WHM users.
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP open_basedir question

Discussion in 'General Discussion' started by jmoe2008, Jan 15, 2006.

  1. jmoe2008

    jmoe2008 Member

    Joined:
    Jan 18, 2005
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    I'm currently looking at enabling PHP open_basedir protection on some domains on my server. However some domains need to be able to open files outside their base directory. I'm unsure on whether I would need to enable an exception for each domain/subdomain that needs to open files, or just for the domain that they would be opening. Also, does open_basedir have any effect if you are opening through a url (assuming url_fopen is enabled)?

    So, to clarify if I have domain1, domain2, and domain3 and domain1 needs to open files from domain3 would I check the box to allow an exception for domain1 or for domain3?
     
  2. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    Why would they need to is the question?
     
  3. jmoe2008

    jmoe2008 Member

    Joined:
    Jan 18, 2005
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    It's for a network that runs on several domains. The design of some scripts means that sites are including files from the main domain from one of the hosting domains.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    IIRC, you need to enable the exception for domain1 because it is that domains VirtualHost container that needs the exception to allow scripts running on it to access outside of the open_basedir protected directory.

    I would not have thought that it would affect URL's at all. php.net would probably have definitive information on that.
     
Loading...

Share This Page