By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

no document_root?

P: n/a
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

Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
In article <3f**********************@dreader2.news.tiscali.nl >, olafmol
<ol**@expansions.nl> writes
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.


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

Jul 17 '05 #2

P: n/a
"olafmol" <ol**@expansions.nl> wrote:
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.


Hi Olaf,

Try $_SERVER['DOCUMENT_ROOT']

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

HTH;
JOn
Jul 17 '05 #3

P: n/a
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 <ca*******@127.0.0.1> wrote in message
news:hG**************@nevis-view.demon.co.uk...
In article <3f**********************@dreader2.news.tiscali.nl >, olafmol
<ol**@expansions.nl> writes
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 ido something about it? I need this because i run a template with an includeinside an eval-block that is requested from 2 different locations.


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

Jul 17 '05 #4

P: n/a
Use Apache for windows instead

Savut

"olafmol" <ol**@expansions.nl> wrote in message
news:3f**********************@dreader2.news.tiscal i.nl...
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

Jul 17 '05 #5

P: n/a
olafmol wrote:
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


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 - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #6

P: n/a
Justin Koivisto wrote:
olafmol wrote:
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


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).


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

http://php.weblogs.com/Apache_IIS

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

Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.