[Semanticscuttle-devel] Reasons for SemanticScuttle fix for apache 1.3
Brought to you by:
cweiske
From: Christian W. <cw...@cw...> - 2011-07-23 06:16:28
|
Hello Benjamin, I'm wondering about a commit you did in 2009-03-05 which breaks some systems. Do you remember the bug number or the reasons why you did that? Maybe have the old conversation with the user who needed that? Code is: Bug fix: correct bug for APACHE 1.3 git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@306 b3834d28-1941-0410-a4f8-b48e95affb8f diff --git a/constants.inc.php b/constants.inc.php index 681a141..c198165 100644 @@ -47,10 +47,14 @@ define('PAGE_WATCHLIST', "watchlist"); // INSTALLATION_ID is based on directory DB and used as prefix (in session and cookie) to prevent mutual login for different installations on the same host server define('INSTALLATION_ID', md5($GLOBALS['dbname'].$GLOBALS['tableprefix'])); - -// Correct bug with PATH_INFO (maybe for Apache 1) +// Correct bugs with PATH_INFO (maybe for Apache 1 or CGI) -- for 1&1 host... if(strlen($_SERVER["PATH_INFO"])<strlen($_SERVER["ORIG_PATH_INFO"])) { $_SERVER["PATH_INFO"] = $_SERVER["ORIG_PATH_INFO"]; } - +if(strcasecmp($_SERVER["PATH_INFO"], $_SERVER["SCRIPT_NAME "]) == 0) { + unset($_SERVER["PATH_INFO"]); +} +if(strpos($_SERVER["PATH_INFO"], '.php') !== false) { + unset($_SERVER["PATH_INFO"]); +} ?> -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |