diff --git a/webroot/index.php b/webroot/index.php index 31c0d4d939..7e0e8e87d1 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -55,8 +55,13 @@ if (!$env) { } if (!isset($_REQUEST['__path__'])) { - phabricator_fatal_config_error( - "__path__ is not set. Your rewrite rules are not configured correctly."); + if (php_sapi_name() == 'cli-server') { + // Compatibility with PHP 5.4+ built-in web server. + $_REQUEST['__path__'] = parse_url( $_SERVER['REQUEST_URI'] )[ 'path' ]; + } else { + phabricator_fatal_config_error( + "__path__ is not set. Your rewrite rules are not configured correctly."); + } } if (get_magic_quotes_gpc()) {