From b4465740116e6ae216fbffc61f8a6c10801ca8ee Mon Sep 17 00:00:00 2001 From: Wil Mahan Date: Mon, 20 Sep 2004 21:53:21 +0000 Subject: [PATCH] Bug 506: use $_SERVER[] instead of getenv() because the latter doesn't work on IIS in ISAPI mode. --- LocalSettings.sample | 4 ++-- includes/DefaultSettings.php | 5 +++-- includes/Setup.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/LocalSettings.sample b/LocalSettings.sample index 829e9686cc..04fb97b781 100644 --- a/LocalSettings.sample +++ b/LocalSettings.sample @@ -74,8 +74,8 @@ $wgLogo = "{$wgStylePath}/images/wiki.png"; ## Preferably these addresses should be able to receive mail asking for help # -$wgEmergencyContact = "wikiadmin@" . getenv( "SERVER_NAME" ); -$wgPasswordSender = "Wikipedia Mail "; +$wgEmergencyContact = "wikiadmin@" . $_SERVER['SERVER_NAME']; +$wgPasswordSender = "Wikipedia Mail "; # MySQL settings # diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 5401b42387..0319147327 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -117,14 +117,15 @@ $wgTmpDirectory = "{$wgUploadDirectory}/tmp"; * Default to wikiadmin@SERVER_NAME * @global string $wgEmergencyContact */ -$wgEmergencyContact = 'wikiadmin@' . getenv( 'SERVER_NAME' ); +$wgEmergencyContact = 'wikiadmin@' . $_SERVER['SERVER_NAME']; + /** * Password reminder email address * The address we should use as sender when a user is requesting his password * Default to apache@SERVER_NAME * @global string $wgPasswordSender */ -$wgPasswordSender = 'Wikipedia Mail '; +$wgPasswordSender = 'Wikipedia Mail '; /** diff --git a/includes/Setup.php b/includes/Setup.php index c04f287e93..ce499d458e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -41,7 +41,7 @@ if( $wgUseSquid && isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { } $wgIP = trim(end($hopips)); } else { - $wgIP = getenv('REMOTE_ADDR'); + $wgIP = $_SERVER['REMOTE_ADDR']; } -- 2.20.1