Hi
I have loged error
[26-Nov-2013 08:28:46 UTC] PHP Warning: require(): open_basedir restriction in effect. File(/class/class.rewrite.php) is not within the allowed path(s): (/home/admin/domains/mydomain.com/public_html/:/tmp:/var/tmp:/usr/local/lib/php/:/home/admin/domains/mydomain.com/public_html/blog/) in /home/admin/domains/mydomain.com/public_html/blog/widget/index.php on line 10
How I should fix issue?
how fix open_basedir issue
Moderator: General Moderators
Re: how fix open_basedir issue
Seems like you have a
when you should have a
The key point is the use of DOCUMENT_ROOT. Without it, "/class/class.rewrite.php" means to look in the class folder in the root of the filesystem, which isn't allowed (hence the error) but not even what you want in the first place.
Code: Select all
require("/class/class.rewrite.php");Code: Select all
require($_SERVER["DOCUMENT_ROOT"] . "/class/class.rewrite.php");Re: how fix open_basedir issue
on line 10 I have this code:
require ($_SERVER["DOCUMENT_ROOT"]."/class/class.rewrite.php");
require ($_SERVER["DOCUMENT_ROOT"]."/class/class.rewrite.php");
Re: how fix open_basedir issue
Does it have a value?
DOCUMENT_ROOT looks like it is supposed to be /home/admin/domains/mydomain.com/public_html.
While you're in there, see if anything else looks wrong.
Code: Select all
print_r($_SERVER);While you're in there, see if anything else looks wrong.