Permalink
Browse files

Add setup check to detect attempts to install on a path

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...
1 parent 38c83ef commit 680076497c7f7b5c358e62bd00b40a1ced64c2c9 @epriestley epriestley committed Oct 22, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/infrastructure/PhabricatorSetup.php
@@ -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(

0 comments on commit 6800764

Please sign in to comment.