From: Wil Mahan Date: Mon, 20 Sep 2004 21:53:21 +0000 (+0000) Subject: Bug 506: use $_SERVER[] instead of getenv() because the latter doesn't work X-Git-Tag: 1.5.0alpha1~1927 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=b4465740116e6ae216fbffc61f8a6c10801ca8ee;p=lhc%2Fweb%2Fwiklou.git Bug 506: use $_SERVER[] instead of getenv() because the latter doesn't work on IIS in ISAPI mode. --- 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']; }