From d56aba77985b160e96dbb5102b3ae97c28e852c0 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 14 Nov 2005 08:56:40 +0000 Subject: [PATCH] This should fix permalinks, but may break the PHP as CGI funkiness again git-svn-id: https://develop.svn.wordpress.org/trunk@3069 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-settings.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index a976ac0b49..a0cc0455c5 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -38,10 +38,11 @@ if ( empty( $_SERVER['REQUEST_URI'] ) ) { 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 ( isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] == $_SERVER['PHP_SELF'] ) +// Fix for Dreamhost and other PHP as CGI hosts +if ( strstr( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) ) unset($_SERVER['PATH_INFO']); + if ( !(phpversion() >= '4.1') ) die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );