Merge pull request #165 from eyeofhell/master

Added compatibility with PHP 5.4+ built-in web server.
This commit is contained in:
Evan Priestley
2012-07-25 11:23:52 -07:00

View File

@@ -55,9 +55,15 @@ if (!$env) {
} }
if (!isset($_REQUEST['__path__'])) { if (!isset($_REQUEST['__path__'])) {
if (php_sapi_name() == 'cli-server') {
// Compatibility with PHP 5.4+ built-in web server.
$url = parse_url($_SERVER['REQUEST_URI']);
$_REQUEST['__path__'] = $url['path'];
} else {
phabricator_fatal_config_error( phabricator_fatal_config_error(
"__path__ is not set. Your rewrite rules are not configured correctly."); "__path__ is not set. Your rewrite rules are not configured correctly.");
} }
}
if (get_magic_quotes_gpc()) { if (get_magic_quotes_gpc()) {
phabricator_fatal_config_error( phabricator_fatal_config_error(