[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Changing DocumentRoot from ../web to ../web/
- Subject: Re: [cobalt-users] Changing DocumentRoot from ../web to ../web/
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Tue Sep 4 08:09:04 2001
- Organization: Befriend Internet Services LLC
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
<johan@xxxxxxxxxx> wrote:
> We are busy testing a large PHP driven site for a client with a view to
move
> them over to a dedicated RaQ.
>
> Their current Apache DocumentRoot is set to "../whatever/web/", but the
RaQ
> uses "../whatever/web", dropping the final slash. And they are using the
> $ROOT_DOCUMENT variable all over in their PHP files as part of include
> statements.
It's actually $DOCUMENT_ROOT. Just wanted to note for those who read this
and try to use that variable.
This is obviously created some havoc, since PHP is trying to
> include files with incorrect path names such
> as "../whatever/webincludes/config.inc" instead
> of "../whatever/web/includes/config.inc"
That's poor coding then. The DocumentRoot probably never should have had a
trailing slash. Might I suggest either:
Doing a global search and replace. "rpl" from laffeycomputer.com is a good
tool for doing just that.
Setting $DOCUMENT_ROOT at the top of each script or in a script called by
every other script. It's a hack, but it will work. $DOCUMENT_ROOT .= '/';
> The easiest would be by far to just change the RaQ setting to include the
slash.
> Is there any reason why one cannot change the DocumentRoot setting to
include
> the slash? I can't think of any, unless Webalizer or some Cobalt specific
> executable prefers the path the exclude the slash?
I'm not sure. It may break some code, other code may just end up with
double slashes since Cobalt's code that depends on that environment variable
will expect no trailing slash and will append a slash to generate paths to
files.
> Another option would be to use .htaccess?
I don't this can ben changed from .htaccess.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/