URL file-access is disabled in the server configuration?

Discussion in 'PHP' started by ian_batten, Sep 3, 2007.

  1. #1
    Hi Guys,
    Okay, since I changed to a VPS, I am getting this message on my index page:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/xxxxxx/public_html/index.php on line 104

    It appears that wherever I have a php include, it comes up with this error message.

    Any ideas how to fix this error?

    Thanks in advance!
     
    ian_batten, Sep 3, 2007 IP
  2. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #2
    In the php.ini file you must have:
    allow_url_fopen = On
    Code (markup):
    But for more secure code you should
    allow_url_fopen = Off
    Code (markup):
     
    nabil_kadimi, Sep 3, 2007 IP
  3. loibeignacio

    loibeignacio Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hi,

    which one did you use?

    //relative
    include $_SERVER['DOCUMENT_ROOT'].'/domain.ph/path/to/file/index.php';

    //absolute
    include 'http://domain.ph/path/to/file/index.php';
     
    loibeignacio, Sep 4, 2007 IP
  4. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #4
    Maybe he found the solution already!
     
    nabil_kadimi, Sep 4, 2007 IP