Connecting Tech Pros Worldwide Help | Site Map

no document_root?

olafmol
Guest
 
Posts: n/a
#1: Jul 17 '05
Hello,

on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
"DOCUMENT_ROOT" environment var. Is there any reason i dont get this? Can i
do something about it? I need this because i run a template with an include
inside an eval-block that is requested from 2 different locations.

Thanks, Olaf



Five Cats
Guest
 
Posts: n/a
#2: Jul 17 '05

re: no document_root?


In article <3fc71783$0$41748$5fc3050@dreader2.news.tiscali.nl >, olafmol
<olaf@expansions.nl> writes[color=blue]
>Hello,
>
>on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
>"DOCUMENT_ROOT" environment var. Is there any reason i dont get this? Can i
>do something about it? I need this because i run a template with an include
>inside an eval-block that is requested from 2 different locations.
>[/color]

Try using $_SERVER["DOCUMENT_ROOT"]

Running phpinfo.php might be of use to you.

--
Surfer!
If you really want to send me email then use:
five_cats at uk2 dot net

Jon Kraft
Guest
 
Posts: n/a
#3: Jul 17 '05

re: no document_root?


"olafmol" <olaf@expansions.nl> wrote:
[color=blue]
> on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have
> any "DOCUMENT_ROOT" environment var. Is there any reason i dont get
> this? Can i do something about it? I need this because i run a
> template with an include inside an eval-block that is requested from 2
> different locations.[/color]

Hi Olaf,

Try $_SERVER['DOCUMENT_ROOT']

http://uk.php.net/manual/en/language...predefined.php

HTH;
JOn
olafmol
Guest
 
Posts: n/a
#4: Jul 17 '05

re: no document_root?


the document_root var isn't defined at all..... it doesnt' show up in the
phpinfo list....

any suggestions? is this normal on a windows NT4 IIS4 CGI installation?

Olaf

Five Cats <cats_five@127.0.0.1> wrote in message
news:hGnERNWuPyx$EwJQ@nevis-view.demon.co.uk...[color=blue]
> In article <3fc71783$0$41748$5fc3050@dreader2.news.tiscali.nl >, olafmol
> <olaf@expansions.nl> writes[color=green]
> >Hello,
> >
> >on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
> >"DOCUMENT_ROOT" environment var. Is there any reason i dont get this? Can[/color][/color]
i[color=blue][color=green]
> >do something about it? I need this because i run a template with an[/color][/color]
include[color=blue][color=green]
> >inside an eval-block that is requested from 2 different locations.
> >[/color]
>
> Try using $_SERVER["DOCUMENT_ROOT"]
>
> Running phpinfo.php might be of use to you.
>
> --
> Surfer!
> If you really want to send me email then use:
> five_cats at uk2 dot net
>[/color]


Savut
Guest
 
Posts: n/a
#5: Jul 17 '05

re: no document_root?


Use Apache for windows instead

Savut

"olafmol" <olaf@expansions.nl> wrote in message
news:3fc71783$0$41748$5fc3050@dreader2.news.tiscal i.nl...[color=blue]
> Hello,
>
> on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
> "DOCUMENT_ROOT" environment var. Is there any reason i dont get this? Can[/color]
i[color=blue]
> do something about it? I need this because i run a template with an[/color]
include[color=blue]
> inside an eval-block that is requested from 2 different locations.
>
> Thanks, Olaf
>
>
>[/color]


Justin Koivisto
Guest
 
Posts: n/a
#6: Jul 17 '05

re: no document_root?


olafmol wrote:
[color=blue]
> Hello,
>
> on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
> "DOCUMENT_ROOT" environment var. Is there any reason i dont get this? Can i
> do something about it? I need this because i run a template with an include
> inside an eval-block that is requested from 2 different locations.
>
> Thanks, Olaf
>
>
>[/color]

DOCUMENT_ROOT I believe is specific to Apache, or at least IIS doesn't
set it. Because of this, when working with IIS, I work off the system
path via:
$DOCUMENT_ROOT=dirname(__FILE__);
which is in a file that I place in the document root. I then have that
file included by all other scripts (sometimes with auto_prepend).

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Justin Koivisto
Guest
 
Posts: n/a
#7: Jul 17 '05

re: no document_root?


Justin Koivisto wrote:
[color=blue]
> olafmol wrote:
>[color=green]
>> Hello,
>>
>> on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
>> "DOCUMENT_ROOT" environment var. Is there any reason i dont get this?
>> Can i
>> do something about it? I need this because i run a template with an
>> include
>> inside an eval-block that is requested from 2 different locations.
>>
>> Thanks, Olaf[/color]
>
> DOCUMENT_ROOT I believe is specific to Apache, or at least IIS doesn't
> set it. Because of this, when working with IIS, I work off the system
> path via:
> $DOCUMENT_ROOT=dirname(__FILE__);
> which is in a file that I place in the document root. I then have that
> file included by all other scripts (sometimes with auto_prepend).
>[/color]

Sorry, I should have provided this as well (from my bookmarks):

http://php.weblogs.com/Apache_IIS

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Closed Thread