DOCUMENT_ROOT not available for IIS

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
KM
Posts: 1
Joined: Sat 20. Dec 2003, 18:47
Location: Loxstedt, Germany

DOCUMENT_ROOT not available for IIS

Post by KM »

Hello,

the usage of DOCUMENT_ROOT ist not possible for IIS, thus all scripts using it will fail.

Pls see also
http://bugs.php.net/bug.php?id=11759

Do you have any idea to get it run under Win2K with IIS 5.0?

Regards,
KM
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

you could try setting document root in the include\inc_libdefault.inc.php to the actuall address on the hardisk...
currently...

Code: Select all

define ("PHPWCMS_ROOT", preg_replace('/\/$/', '', $_SERVER['DOCUMENT_ROOT']).(($phpwcms["root"]) ? "/".$phpwcms["root"] : "") );
change to..

Code: Select all

define ("PHPWCMS_ROOT", "DriveLetter:\Directory/SubDirectory/WWWRootDirectory/".(($phpwcms["root"]) ? "/".$phpwcms["root"] : "") );
the only other instance of DOCUMENT_ROOT is in /img/random_image.php
hope it helps.
Florian
Posts: 119
Joined: Wed 19. Nov 2003, 16:50
Location: Hamburg
Contact:

Post by Florian »

Well, pSoupers solution seem's to be a good one.

I run my dev phpwcms under W2003 Server Enterprise Edition (MSDN Eval.) and IIS 6.0. I have absolutly no problems with it. Maybe your php.ini declarations are worng at any line, or (more possible) the directories permissions are not set in the right way on your system.

Cheers,
Florian
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Here is a simpler solution:

If you think or know that there is no $_SERVER['DOCUMENT_ROOT'] var set for your PHP install (often seen on IIS) then add following line to your conf.inc.php

$_SERVER['DOCUMENT_ROOT'] = 'path_to_my_doc_root';

Regards
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
peteinman
Posts: 31
Joined: Mon 29. Mar 2004, 00:02

Post by peteinman »

Well that worked beautifully. :D

Thanks everyone for your help.

Now to find out how to create menus, pages and categories, and basically use the product.

Thanks again.

Pete
antipodean
Posts: 10
Joined: Thu 25. Mar 2004, 16:39

Post by antipodean »

Hello all. Just wanted to add a post to this thread for info only. This seems to be a problem that is not specific to IIS and Windows. I could not edit articles until I had applied this same solution (Oliver's post above) and I am running apache server on Mac OS X (10.2.8).

See this thread

http://www.phpwcms.de/forum/viewtopic.p ... sc&start=0

Thanks Oliver for a simple solution.
Post Reply