Koozali.org: home of the SME Server

i-bay PHP $DOCUMENT_ROOT variable incorrect

Stephen

i-bay PHP $DOCUMENT_ROOT variable incorrect
« on: February 21, 2003, 05:36:39 PM »
Hi,

I have created an i-bay and it is all set up correctly as far as I know using the server manager. The problem is, when I got to do some coding in PHP and I wish to use the $DOCUMENT_ROOT variable or $_SERVER['DOCUMENT_ROOT'], it displays the wrong value. I am expecting it to show something like "/home/e-smith/files/mysite/html" but I get "/home/e-smith/files/primary/html"

For some reason PHP is using the default ibay as the document root and it is really annoying because the document root variable would allow much more flexible coding.

I know it can be changed somehow because I've seen another ibay with the document root set to the correct value.

Any help appreciated :-)

Chaloner Hale

Re: i-bay PHP $DOCUMENT_ROOT variable incorrect
« Reply #1 on: February 22, 2003, 06:46:08 PM »
What application are you running? OSC?

Chaloner Hale

Stephen

Re: i-bay PHP $DOCUMENT_ROOT variable incorrect
« Reply #2 on: February 23, 2003, 04:36:48 AM »
You've lost me a bit...

I'm just trying to run some code that I've written for a website and it relies on the $DOCUMENT_ROOT variable being correct so I can correctly include files and set server paths to the i-bay in my code without having to specify them in hard code.

Charlie Brady

Re: i-bay PHP $DOCUMENT_ROOT variable incorrect
« Reply #3 on: February 23, 2003, 05:37:17 AM »
Stephen wrote:

> I'm just trying to run some code that I've written for a
> website and it relies on the $DOCUMENT_ROOT variable being
> correct so I can correctly include files and set server paths
> to the i-bay in my code without having to specify them in
> hard code.

Use relative pathnames.

Charlie