WordPress 2.51 and IIS error - Notice: Undefined index: REQUEST_URI in \wp-settings.php on line 81
The original wordpress 2.5 error mentioned in the last post was fixed in the 2.51 release but there is an additional error that crops up. If you are getting an error similiar to the follwing:
Notice: Undefined index: REQUEST_URI in F:\Domains\mydomain.com\wwwroot\wp-settings.php on line 81
To solve this issue you need to edit the wp-settings.php file. After line 79 or “// Append the query string if it exists and isn’t null” add the following line:
$_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],0);
This error is due to IIS not recognizing ‘REQUEST_URI’
If you don’t want to make the modification yourself you can download the modified wp-setting.php file from here.
WordPress 2.5 and IIS error and solution
After installing WordPress 2.5 I started getting a line of error text in every page of the admin area:
Notice: Undefined index: PATH_INFO in C:\WebSites\user\webroot\blog\wp-settings.php on line 72
Notice: Undefined index: PATH_INFO in C:\WebSites\user\webroot\blog\wp-settings.php on line 75
To solve this issue you need to edit the wp-settings.php file. Open the file in your favorite editor and after line 71 or “// Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)” insert the following:
if ( isset($_SERVER['PATH_INFO']) ) {
add the closing “}” just above the original line 77 or “// Append the query string if it exists and isn’t null”
With those changes the problem is solved. I assume this problem will be fixed in the next release of WordPress.


