From 5006543d9deb6ffca69ab57b03da76d9ae317d69 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 3 Jan 2007 07:41:20 +0000 Subject: [PATCH] Revert the attempt to autodetect CGI configs with working PATHINFO, since it turns out not to be reliable enough. For example, current versions of lighttpd munge PATH_INFO fatally on Mac OS X, and problems have been reported on other systems as well. Sigh. --- RELEASE-NOTES | 4 ---- config/index.php | 9 +++------ includes/DefaultSettings.php | 19 ++++++++++++------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 97b5971c2b..520042d3c3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -190,10 +190,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 7932) Make sure that edit toolbar clears floats so it appears correctly. * (bug 6873) When viewing old revisions, add link to diff to current version. * (bug 3315) Provide rollback link directly on history page. -* Detect CGI configurations where PATH_INFO is set up correctly. - PHP config var cgi.fix_pathinfo isn't detectable through ini_get(), but - we can find some side-effects. Only tested on lighttpd so far, hopefully - right on Apache too! * Replace 'old-revision-navigation' message with 'revision-info' and 'revision-nav' messages, wrapped in divs with appropriate id's. * (bug 4178) MediaWiki:Common.js will now be included for all users if diff --git a/config/index.php b/config/index.php index e98542dcde..3dffb673da 100644 --- a/config/index.php +++ b/config/index.php @@ -353,12 +353,9 @@ case "apache2handler": case "cgi": case "cgi-fcgi": // For some reason cgi.fix_pathinfo isn't retrievable via ini_get() - if( isset( $_SERVER['ORIG_PATH_INFO'] ) ) { - echo "cgi.fix_pathinfo is set, good; "; - } else { - echo "cgi.fix_pathinfo is not set, assuming PATH_INFO broken; "; - $conf->prettyURLs = false; - } + // but even if it is, it's not necessarily safe. + // @fixme add optional runtime testing...? + $conf->prettyURLs = false; break; case "apache2filter": case "isapi": diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index bef233b35b..09281fd2c7 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -87,19 +87,24 @@ $wgScriptPath = '/wiki'; /** * Whether to support URLs like index.php/Page_title - * These often break when PHP is set up in CGI mode, so - * ignore PATH_INFO for CGI unless cgi.fix_pathinfo is - * set. + * These often break when PHP is set up in CGI mode. + * PATH_INFO *may* be correct if cgi.fix_pathinfo is + * set, but then again it may not; lighttpd converts + * incoming path data to lowercase on systems with + * case-insensitive filesystems, and there have been + * reports of problems on Apache as well. + * + * To be safe we'll continue to keep it off by default. * * Override this to false if $_SERVER['PATH_INFO'] - * contains unexpectedly incorrect garbage. + * contains unexpectedly incorrect garbage, or to + * true if it is known to be correct. * * Note that having this incorrectly set to true can * cause redirect loops when "pretty URLs" are used. */ -$wgUsePathInfo = - ( strpos( php_sapi_name(), 'cgi' ) === false ) || - isset( $_SERVER['ORIG_PATH_INFO'] ); +$wgUsePathInfo = ( strpos( php_sapi_name(), 'cgi' ) === false ); + /**#@+ * Script users will request to get articles -- 2.20.1