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 5.25 Include Problem

Discussion in 'General Discussion' started by BrandMan211, Dec 18, 2007.

  1. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,383
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You need to enable allow_url_include:

    http://us.php.net/manual/en/ref.filesystem.php#ini.allow-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. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    I tried that too and I still got the error.
     
  4. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    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.
     
  5. graham_w

    graham_w Well-Known Member

    Joined:
    May 25, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
    #5 graham_w, Dec 19, 2007
    Last edited: Dec 19, 2007
  6. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    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. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,383
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    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:
    <?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. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Strangely, after restarting Apache this time, it worked. I don't remember having to restart it before...thanks.
     
Loading...

Share This Page