Revert the attempt to autodetect CGI configs with working PATHINFO, since it turns...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 3 Jan 2007 07:41:20 +0000 (07:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 3 Jan 2007 07:41:20 +0000 (07:41 +0000)
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
config/index.php
includes/DefaultSettings.php

index 97b5971..520042d 100644 (file)
@@ -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
index e98542d..3dffb67 100644 (file)
@@ -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":
index bef233b..09281fd 100644 (file)
@@ -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