Click to See Complete Forum and Search --> : $document_root
alan92rttt
06-03-2003, 11:00 PM
THe company I work for is moving the host for the site I've done for them. It uses $DOCUMENT_ROOT. The old host was a unix/apache based system. The new host is windows/IIS.
The problem $DOCUMENT_ROOT does not exist. I can not find a referance that tells me what needs to be configured to make this work.
globals are on in the php.ini
And this needs to work as is did under apache where the value is unique to each subdomain.
Thanks in advance.
Alan
leatherback
06-04-2003, 04:13 AM
Have you tried:
getenv(DOCUMENT_ROOT)
J.
alan92rttt
06-07-2003, 08:41 PM
That returns a null
If I look at the output of the phpinfo() function the string "DOCUMENT_ROOT" does not exist.
benkillin
06-08-2003, 08:06 PM
from what I know, you dont need document root on windows... you can put the full path starting with the domain like this:
http://domain.com/this/is/the/document/
from basic HTML, an absolute link... though not very wise to do...
alan92rttt
06-08-2003, 11:39 PM
#1 document root returns the server side path not the http path so it wouild be c:/inetpub/somefolder
#2 I don't want to hard code the path. The software runs on 5 subdomains right now and more as my client adds clients. So I really need a proper dynamic referance.
jonathen
06-19-2003, 08:17 PM
You are running PHP in CGI mode when using it with IIS, so unfortunately, you cannot use $DOCUMENT_ROOT. The only two options I can think of is:
Create an include file that contains:
define(DOCUMENT_ROOT, "c:\inetpub\wwwroot") and then include that in all PHP files - you can then call $DOCUMENT_ROOT variable.
Trash IIS and use Apache for Windows (much easier!)
HTH
Jonathen
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.