From: Brion Vibber Date: Sun, 27 Mar 2005 06:37:21 +0000 (+0000) Subject: * Installation fixes for running under IIS X-Git-Tag: 1.5.0alpha1~490 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=2de124fdbc6a8c3aa1306745831eba4b39662ce9;p=lhc%2Fweb%2Fwiklou.git * Installation fixes for running under IIS $_SERVER['REQUEST_URI'] and $_SERVER['SERVER_ADMIN'] aren't set under IIS. Fall back to $_SERVER['SCRIPT_NAME'] for determining base URL on install. --- diff --git a/config/index.php b/config/index.php index 0fbf898604..331fdf4e11 100644 --- a/config/index.php +++ b/config/index.php @@ -330,13 +330,16 @@ $conf->IP = dirname( dirname( __FILE__ ) ); print "
  • Installation directory: " . htmlspecialchars( $conf->IP ) . "
  • \n"; # $conf->ScriptPath = "/~brion/inplace"; -$conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $_SERVER["REQUEST_URI"] ); +$conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $_SERVER["SCRIPT_NAME"] ); print "
  • Script URI path: " . htmlspecialchars( $conf->ScriptPath ) . "
  • \n"; $conf->posted = ($_SERVER["REQUEST_METHOD"] == "POST"); $conf->Sitename = ucfirst( importPost( "Sitename", "" ) ); - $conf->EmergencyContact = importPost( "EmergencyContact", $_SERVER["SERVER_ADMIN"] ); + $defaultEmail = empty( $_SERVER["SERVER_ADMIN"] ) + ? 'root@localhost' + : $_SERVER["SERVER_ADMIN"]; + $conf->EmergencyContact = importPost( "EmergencyContact", $defaultEmail ); $conf->DBserver = importPost( "DBserver", "localhost" ); $conf->DBname = importPost( "DBname", "wikidb" ); $conf->DBuser = importPost( "DBuser", "wikiuser" ); diff --git a/includes/Setup.php b/includes/Setup.php index 39c3ab8b3a..a43cfc3263 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -115,7 +115,7 @@ if ( $wgCommandLineMode ) { wfDebug( "$name: $value\n" ); } wfDebug( "\n" ); -} else { +} elseif( isset( $_SERVER['REQUEST_URI'] ) ) { wfDebug( $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . "\n" ); }