Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-24-2008, 06:12 AM   PM User | #1
rbowling
New Coder

 
Join Date: Mar 2008
Posts: 19
Thanks: 5
Thanked 0 Times in 0 Posts
rbowling is an unknown quantity at this point
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' ); 
rbowling is offline   Reply With Quote
Old 07-24-2008, 06:27 AM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,741
Thanks: 4
Thanked 2,465 Times in 2,434 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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'); 
Fou-Lu is offline   Reply With Quote
Old 07-24-2008, 07:05 AM   PM User | #3
rbowling
New Coder

 
Join Date: Mar 2008
Posts: 19
Thanks: 5
Thanked 0 Times in 0 Posts
rbowling is an unknown quantity at this point
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?
rbowling is offline   Reply With Quote
Old 07-24-2008, 08:09 AM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,741
Thanks: 4
Thanked 2,465 Times in 2,434 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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'); 
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:23 AM.


Advertisement
Log in to turn off these ads.