Results 1 to 10 of 10
  1. #1
    Join Date
    May 2007
    Location
    New York
    Posts
    72

    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
    Join Date
    Oct 2001
    Location
    The Netherlands, Europe
    Posts
    153
    You need this in your php.ini:

    allow_url_include = On

  3. #3
    Join Date
    May 2007
    Location
    New York
    Posts
    72
    Tried that to no avail. This used to be fine until I upgraded it. I don't have to rebuild PHP after I added that line of code, do I? I don't believe that's how it works...I checked in my PHP info and it says that I enabled that. Any other ideas?

  4. #4
    Join Date
    Aug 2005
    Posts
    309
    Which line of the server configuration file is specified in the error? (The FILE DIRECTORY on LINE NUMBER part) And what configuration parameter is on that line?

  5. #5
    Join Date
    May 2007
    Location
    New York
    Posts
    72
    Those fields refer to the page the error occured, not where on the config file. On said line on that file was a simple PHP include.

  6. #6
    Join Date
    Jun 2004
    Location
    Bay Area
    Posts
    1,320
    Dit you build PHP with Curl and --enable-sockets? Its a wild guess but it might have something to do with it...
    Powered by Level3, GBLX and AT&T

  7. #7
    Join Date
    May 2007
    Location
    New York
    Posts
    72
    I did it with cURL, yes. But apparently after restarting Apache with allow_url_include, it worked. Thanks anyway guys.

  8. #8
    Join Date
    Nov 2005
    Posts
    3,944
    You might want to consider a different way of doing the script, allow_url_include can be taken advantage by hackers fairly easy.


  9. #9
    Quote Originally Posted by BrandMan211 View Post
    I did it with cURL, yes. But apparently after restarting Apache with allow_url_include, it worked. Thanks anyway guys.
    In most hosted environments, the PHP configuration file is read when the web server is started. Any time you make changes to your php.ini file, you need to restart the web server.

  10. #10
    i had similar problems when enabling Zend Optimizer, once disabled or downgrade to an older version, the problem is gone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •