Permalink
Browse files

Fixes #1591 (again)

git-svn-id: http://svn.automattic.com/wordpress/trunk@3034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent c42cbf7 commit c50e7da21bf11e8e0e852f3b75abd8161d7fbb80 matt committed Nov 10, 2005
Showing with 8 additions and 0 deletions.
  1. +8 −0 wp-settings.php
View
@@ -34,6 +34,14 @@ function unregister_GLOBALS() {
}
}
+// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
+if ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 )
+ $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
+
+// Fix for PHP as CGI hosts that set PATH_INFO to PHP_SELF value
+if ( $_SERVER['PATH_INFO'] == $_SERVER['PHP_SELF'] )
+ unset($_SERVER['PATH_INFO']);
+
if ( !(phpversion() >= '4.1') )
die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );

0 comments on commit c50e7da

Please sign in to comment.