Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2008
    Posts
    19
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Got an error after install

    i installed this script and all i get it these 3 messages on screen and i cant find the problem.
    ..Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/inc/design.inc.php) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a2950482/public_html/index.php on line 39

    ..Warning: require_once(/usr/local/apache/htdocs/inc/design.inc.php) [function.require-once]: failed to open stream: Operation not permitted in /home/a2950482/public_html/index.php on line 39

    ..Fatal error: require_once() [function.require]: Failed opening required '/usr/local/apache/htdocs/inc/design.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a2950482/public_html/index.php on line 39 ..
    here is line 39 of the index.php script ... any answer will be appreciated.
    PHP Code:
    require_once( BX_DIRECTORY_PATH_INC 'design.inc.php' ); 

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    The error indicates that the file you're accessing is outside of what PHP has been configured to allow. This 'BX_DIRECTORY_PATH_INC' constant is likely the problem, as it replaces with /usr/local/apache/httpd/inc when clearly the files you are running are located within /home/a2950482/public_html. I'm guessing that design.inc.php is actually located at /home/a2950482/public_html/inc/design.inc.php correct?

    Can you find the location that BX_DIRECTORY_PATH_INC has been defined, and post what its value is (define('BX_DIRECTORY_PATH_INC', ???);)?
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Mar 2008
    Posts
    19
    Thanks
    5
    Thanked 0 Times in 0 Posts
    I have no idea where it is ... ive searched for it before i asked ... what can i do about it?...can i just rename it to where it is located?

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Yes and no. The problem is that you're only real other option is to use relative paths, and unless you control you're current working directories, relative paths can be difficult when including several files in depth. I don't recommend changing it, and I'm guessing that a lot of you're scripts are written with a constant in front of the files.

    Here's how you find it. We know that the constant is defined, so that means that there is either a definition for the constant in this file, or in another file that has been included before the design.inc.php file. If there is no define() call in the index.php file, look at its list of included/required files. Good starters are anything with the word constant in its name (include 'constants.php'), or if most of you're inclusions have a constant in front of them, one of them cannot - this is likely the file thats generating these constants. I need to know the code thats being used to create these constant's values ($_SERVER['DOCUMENT_ROOT'] for example), so that I can direct you on how to change them.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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