WordPress 2.5 Error on Windows IIS:Undefined index: PATH_INFO

After upgrading to WordPress version 2.5 on Windows IIS,you may get the following errors:

Notice: Undefined index: PATH_INFO in (path)\wp-settings.php on line 74
Notice: Undefined index: PATH_INFO in (path)\wp-settings.php on line 77 

to solve this problem,open file wp-settings.php,goto line 71 and replace the following code:

if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
	$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
else
	$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];

with:

if (empty($_SERVER['PATH_INFO']))
	$_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/';
else if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
	$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
else
	$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];

this will resolve that issue,Your can also download an already modified version of wp-setting.php from here.

Related posts:

TAGS: , , , ,


3 Comments »

shuigji On March 25th, 2009 at 7:59 pm (#)

go!http://www.dubozuobi.com

ZishiciarsE On October 7th, 2008 at 8:46 am (#)

favorited this one, bro

mikelorie.com » Blog Archive » Test po On May 20th, 2008 at 12:36 pm (#)

[...] trying to finish a book. What I was getting were ‘undefined index’ errors; thanks to deanlee.com for the quick fix. And, of course, there were settings to change. Rereklamo kasi [...]


Leave a comment


(will not be published)