Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » RADICORE Installation Issues » Problem with IIS
Re: Problem with IIS [message #1198 is a reply to message #1196] Tue, 18 December 2007 05:08 Go to previous messageGo to previous message
theos is currently offline  theos
Messages: 3
Registered: December 2007
Junior Member
In comments of user in http://www.php.net/reserved.variables:

$_SERVER['DOCUMENT_ROOT'] *is* supported by IIS, although only when running PHP as an ISAPI module.


Two possible solutions

1.- How to get $_SERVER["DOCUMENT_ROOT"] on IIS :

1.1.-

<?php
if ( ! isset($_SERVER['DOCUMENT_ROOT'] ) )
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(
$_SERVER['SCRIPT_FILENAME'], 0, -strlen($_SERVER['PHP_SELF']) ) );
?>

1.2-

<?php
if(!isset($_SERVER["DOCUMENT_ROOT"]))
{$_SERVER["DOCUMENT_ROOT"]=substr($_SERVER['SCRIPT_FILENAME'] , 0 , -strlen($_SERVER['PHP_SELF'])+1 );
}
?>

2.-

You can add $_SERVER["DOCUMENT_ROOT"] to IIS by editing the Environment Variables of your Windows server (was tested on WinXP SP2).

Right click on My Computer >> Properties >> Advanced.
In the System variables click on 'New' and Type in the name field 'DOCUMENT_ROOT' and in the value field the path to your IIS document root folder.

Don't forget to restart your Windows (IIS restart won't load the new settings).

Thank you for the support
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: pg_connect parameter order?
Next Topic: unable to logon
Goto Forum:
  


Current Time: Thu Sep 12 17:20:03 EDT 2024

Total time taken to generate the page: 0.01205 seconds