1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00

Add installation check for dot in domain.

Summary: Add installation check for a dot in the domain, which is necessary for some browsers to set cookies.

Test Plan: Restart web server to force the setup procedures to run again.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4710
This commit is contained in:
Bryan Cuccioli 2013-01-28 17:45:56 -08:00 committed by epriestley
parent 15e284caa9
commit 1fc0c3b1e8
2 changed files with 23 additions and 0 deletions

View file

@ -4,6 +4,26 @@ final class PhabricatorSetupCheckBaseURI extends PhabricatorSetupCheck {
protected function executeChecks() {
$base_uri = PhabricatorEnv::getEnvConfig('phabricator.base-uri');
if (strpos($_SERVER['HTTP_HOST'], '.') === false) {
$summary = pht(
'The domain does not contain a dot. This is necessary for some web '.
'browsers to be able to set cookies.');
$message = pht(
'The domain in the base URI must contain a dot ("."), e.g. '.
'"http://example.com", not just a bare name like "http://example/". '.
'Some web browsers will not set cookies on domains with no TLD.');
$this
->newIssue('config.phabricator.domain')
->setShortName(pht('Dotless Domain'))
->setName(pht('No Dot Character in Domain'))
->setSummary($summary)
->setMessage($message)
->setIsFatal(true);
}
if ($base_uri) {
return;
}

View file

@ -30,6 +30,9 @@ some subdirectory of an existing website. Navigate to whatever domain you're
going to use and make sure Apache serves you something to verify that DNS
is correctly configured.
NOTE: The domain must contain a dot ('.'), i.e. not be just a bare name like
'http://example/'. Some web browsers will not set cookies otherwise.
Now, either create a VirtualHost entry (to put Phabricator on a subdomain)
or edit the Directory entry for the DocumentRoot. It should look something like
this: