Skip to content

Commit

Permalink
Add setup check to detect attempts to install on a path
Browse files Browse the repository at this point in the history
Summary:
We don't support this and say so in the documentation, but can check explicitly.

https://github.com/facebook/phabricator/issues/148

Test Plan: Set base-uri to stuff with/without paths, verified setup caught mistakes and gave useful errors.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3768
  • Loading branch information
epriestley committed Oct 22, 2012
1 parent 38c83ef commit 6800764
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/infrastructure/PhabricatorSetup.php
Expand Up @@ -357,6 +357,21 @@ public static function runSetup() {
"'http://example.com/'.");
return;
}

$host_path = $host_uri->getPath();
if ($host_path == '/') {
self::write(" okay phabricator.base-uri path\n");
} else {
self::writeFailure();
self::write(
"Your 'phabricator.base-uri' setting includes a path, but should ".
"not (e.g., 'http://phabricator.example.com/' is OK, but ".
"'http://example.com/phabricator/' is not). Phabricator must be ".
"installed on an entire domain, it can not be installed on a ".
"path alongside other applications. Consult the documentation ".
"for more details.");
return;
}
}

$timezone = nonempty(
Expand Down

0 comments on commit 6800764

Please sign in to comment.