Re: not sure, what now

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



chris smith wrote:
On 2/26/06, Schalk <schalk@xxxxxxxxxxx> wrote:
Greetings All,

I am pretty new to PHP and are tasked to move a clients site from:

www.domain.com/somedirectory/home.php to www.home.php

If you're moving a clients site wouldn't your work be a better place
to ask? They will have processes etc to follow on how to do this and
will be able to help you a lot quicker than anyone here.

Sounds simple at first but, when I moved the files to the root of the
httpdocs I get an array of errors in the vain of:
*Warning*: main(): open_basedir restriction in effect.
File(../inc/siteconfig.php) is not within the allowed path(s):
(/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs:/tmp) in
/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on line 1

What exactly does this mean? I am sure there must be a config somewhere
that has set it up to load from the sub directory and now it prevents it
from loading from the root directory. Is this correct? What exactly does
this error mean? Thanks to all!*

Open_basedir restricts where you can access files (see
http://www.php.net/features.safe-mode and search for 'open_basedir' to
tell you exactly what it does).

If you are in this folder:

/home/httpd/vhosts/domain.com/httpdocs

you are trying to include '../inc/siteconfig.inc.php'

so that means you are trying to access:

/home/httpd/vhosts/domain.com/inc/siteconfig.inc.php

which isn't in the open_basedir list (so php is stopping you).

Adjust the path to the 'siteconfig.inc.php' file and you should be right to go.

Where is Open_basedir set? In a global php setting or can it be done site by site? And if so, what is the most logical place to put the file that controls this?

The reason I ask is because I have found a file called siteconfig.php located in the inc/ directory and below, please find it's contents.

<?
$template_title="Seal Beach Professionals - REFERRAL Networking Group";
$template_bgcolor="#4C4A4A";
$template_textcolor="#000000";
$template_bgpicture="../images/bg.gif";
$template_content_bgcolor="#FFFFFF";
$template_header_pic="../images/header.jpg";
$template_footer_pic="../images/footer_img.jpg";

$template_database_host="localhost";
$template_database="sealdata";
$template_databasen="sealuser";
$template_databasep="sealpass";
?>

I do not see anything here that will restrict it from running from either www.thedomain.com or www.thedomain.com/subfolder/

These all seem to be loading relative to root.

Thanks for everyones help so far.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux