Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Apr 2007
    Posts
    30

    Default PHP 5.25 Include Problem

    Hey,

    I have just recently rebuilt my Apache to version 2.2 and PHP to 5.25. Now I am receiving this error:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in FILE DIRECTORY on line NUMBER
    I have checked and allow_url_fopen is enabled. Why would this be occurring if allow_url_fopen is enabled?

    Thanks.

  2. #2
    Member
    Join Date
    Aug 2002
    Posts
    1,118

    Default

    You need to enable allow_url_include:

    http://us.php.net/manual/en/ref.file...ow-url-include

    I would really investigate this and make sure this is really necessary for this account. If the account is trying to include files from its own account using URLs, then its better to just include them via the file system.

    Further, I would really only recommend enabling this on a case-by-case basis instead of server-wide.

  3. #3
    Member
    Join Date
    Apr 2007
    Posts
    30

    Default

    I tried that too and I still got the error.

  4. #4
    Member WebScHoLaR's Avatar
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    504

    Default

    Quote Originally Posted by BrandMan211 View Post
    Hey,

    I have just recently rebuilt my Apache to version 2.2 and PHP to 5.25. Now I am receiving this error:



    I have checked and allow_url_fopen is enabled. Why would this be occurring if allow_url_fopen is enabled?

    Thanks.
    If you are running Zend 3.3.0 then downgrade it to previous build. I faced this problem withe Zend 3.3.0 and downgrading Zend fixed it.

    Regards,
    WebScHoLaR

    WebHosting Blog: http://WebScHoLaR.net

  5. #5
    Member
    Join Date
    May 2004
    Posts
    45

    Default

    Adding
    Code:
    allow_url_include = On
    Below
    Code:
    allow_url_fopen = On
    in php.ini and restarting Apache did the trick for me. This is on two servers - one running Apache 2.2 with PHP 5.2.5 and Zend 3.3.0 and the other running Apache 1.3.39 PHP 4.4.7 and Zend 3.2.2.
    Last edited by graham_w; 12-19-2007 at 05:07 AM.

  6. #6
    Member
    Join Date
    Apr 2007
    Posts
    30

    Default

    I have the include line and it still doesn't work for me. What are you guys using to edit it? If you are just editing the file, where is it located? I've been editing it by unconventional means.

  7. #7
    Member
    Join Date
    Aug 2002
    Posts
    1,118

    Default

    The first thing you need to find out is how are you running PHP?

    Are you running it as CGI or as an Apache module?

    You can test this by creating a phpinfo.php file somewhere in a public_html area on your server. The file should contain the following:

    PHP Code:
    <?php phpinfo(); ?>
    Now visit this phpinfo.php file through the web. Look for the part near the top that says Server API. This will either be Apache or CGI.

    Also look for the section that says Loaded Configuration File. This is the path to the php.ini file that is being read.

    This is the file you need to edit. You need to edit that file on the server and make sure:

    allow_url_include = On

    Is in that file and not commented out.

    If you are using Apache as your Server API then you need to restart Apache after you save this file for the changes to take affect. If you are using CGI, then the changes should take affect immediately.

  8. #8
    Member
    Join Date
    Apr 2007
    Posts
    30

    Default

    Strangely, after restarting Apache this time, it worked. I don't remember having to restart it before...thanks.

Similar Threads & Tags
Similar threads

  1. PHP or include
    By msh100 in forum Themes and Branding
    Replies: 2
    Last Post: 06-29-2008, 06:32 PM
  2. php include problem
    By cosmin in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 05-10-2007, 11:18 PM
  3. php include path
    By KarterJK in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-19-2004, 01:38 PM
  4. CGI/PHP include?
    By andy7t in forum Themes and Branding
    Replies: 1
    Last Post: 03-15-2004, 02:52 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube