mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 16:00:59 +01:00
Merge pull request #165 from eyeofhell/master
Added compatibility with PHP 5.4+ built-in web server.
This commit is contained in:
commit
28618b345e
1 changed files with 8 additions and 2 deletions
|
@ -55,8 +55,14 @@ 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.
|
||||
$url = parse_url($_SERVER['REQUEST_URI']);
|
||||
$_REQUEST['__path__'] = $url['path'];
|
||||
} else {
|
||||
phabricator_fatal_config_error(
|
||||
"__path__ is not set. Your rewrite rules are not configured correctly.");
|
||||
}
|
||||
}
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
|
|
Loading…
Reference in a new issue