Page MenuHomePhabricator

$_SERVER['REQUEST_URI'] undefined on IIS 5.0, Patch included
Closed, ResolvedPublic

Description

Author: daniel.schoemer

Description:
Running Mediawiki 1.9.2 on Windows 2000 Server with Internet Information
Services 5.0.

On a page history, the following PHP warning gets displayed:

Notice: Undefined index: REQUEST_URI in ...\includes\Wiki.php on line 427

The following patch eleminates the warning for me:

modified file 'includes/Wiki.php'

  • includes/Wiki.php 2007-02-14 10:57:34 +0000

+++ includes/Wiki.php 2007-02-15 10:43:47 +0000
@@ -422,7 +422,8 @@

        }
        break;
case 'history':
  • if( $_SERVER['REQUEST_URI'] == $title-

getInternalURL( 'action=history' ) ) {

+ $request_uri =
array_key_exists('REQUEST_URI', $_SERVER) ? $_SERVER['REQUEST_URI'] :
$_SERVER['ORIG_PATH_INFO'];
+ if( $request_uri == $title-

getInternalURL( 'action=history' ) ) {

$output->setSquidMaxage( $this-

getVal( 'SquidMaxage' ) );

}
$history = new PageHistory( $article );

Version: 1.9.x
Severity: trivial
OS: Windows 2000
Platform: PC

Details

Reference
bz8992

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:33 PM
bzimport set Reference to bz8992.
bzimport added a subscriber: Unknown Object (MLST).

daniel.schoemer wrote:

Patch for bug #8992

Attached patch

Attached:

Correct fix is to use $wgRequest functions as done elsewhere for bug 3000; this
one apparently missed the boat. :)

Fixed on trunk in r19956, REL1_9 in r19957

ammatsun wrote:

Additional patch for bug #8992

Resolves similar issue with REQUEST_URI in includes/Article.php.

Attached: