Index: branches/5.3.x/core/install/prerequisites.php =================================================================== diff -u -r15483 -r15677 --- branches/5.3.x/core/install/prerequisites.php (.../prerequisites.php) (revision 15483) +++ branches/5.3.x/core/install/prerequisites.php (.../prerequisites.php) (revision 15677) @@ -1,6 +1,6 @@ ='); - $ret['url_rewriting'] = function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules()); + + if ( function_exists('apache_get_modules') ) { + $mod_rewrite = in_array('mod_rewrite', apache_get_modules()); + } + else { + $mod_rewrite = getenv('HTTP_MOD_REWRITE') == 'On'; + } + + $ret['url_rewriting'] = $mod_rewrite; $ret['memcache'] = class_exists('Memcache'); $ret['curl'] = function_exists('curl_init'); $ret['simplexml'] = function_exists('simplexml_load_string'); @@ -144,14 +152,30 @@ $ret['display_errors'] = $this->isPhpSettingChangeable('display_errors', '1'); $ret['error_reporting'] = $this->canChangeErrorReporting(); $ret['date.timezone'] = ini_get('date.timezone') != ''; + $ret['variables_order'] = $this->_hasLetters(ini_get('variables_order'), Array ('G', 'P', 'C', 'S')); - $ret['variables_order'] = strpos(ini_get('variables_order'), 'GPC') !== false; - $ret['output_buffering'] = ini_get('output_buffering') > 0; + $output_buffering = strtolower(ini_get('output_buffering')); + $ret['output_buffering'] = $output_buffering == 'on' || $output_buffering > 0; return $ret; } /** + * Determines of a setting string has all given letters (ignoring order) in it + * + * @param string $setting + * @param Array $search_letters + * @return bool + * @access protected + */ + protected function _hasLetters($setting, $search_letters) + { + $setting = preg_replace('/(' . implode('|', $search_letters) . ')/', '*', $setting); + + return substr_count($setting, '*') == count($search_letters); + } + + /** * Detects if error reporting can be changed at runtime * * @return bool