mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Add an explicit test for the availablility of 'php' from the command line during
setup Summary: See T481. We'll fail the pcntl test if we don't have this, in a potentially confusing way. Test and detect missing 'php' explicitly before we try the pcntl test, so we can give the user a better error message. Test Plan: In setup mode, did a good run and then faked it to execute 'phpx' instead to get a failure. Reviewers: johnduhart, jungejason, tuomaspelkonen, aran Reviewed By: tuomaspelkonen CC: aran, epriestley, tuomaspelkonen Differential Revision: 878
This commit is contained in:
parent
9dde79a732
commit
40c1450129
1 changed files with 15 additions and 0 deletions
|
@ -145,6 +145,21 @@ class PhabricatorSetup {
|
|||
}
|
||||
}
|
||||
|
||||
list($err, $stdout, $stderr) = exec_manual(
|
||||
'/usr/bin/env php -r %s',
|
||||
'exit;');
|
||||
if ($err) {
|
||||
self::writeFailure();
|
||||
self::write("Unable to execute 'php' on the command line from the web ".
|
||||
"server. Verify that 'php' is in the webserver's PATH.\n".
|
||||
" err: {$err}\n".
|
||||
"stdout: {$stdout}\n".
|
||||
"stderr: {$stderr}\n");
|
||||
return;
|
||||
} else {
|
||||
self::write(" okay PHP is available from the command line.\n");
|
||||
}
|
||||
|
||||
$root = dirname(phutil_get_library_root('phabricator'));
|
||||
|
||||
// On RHEL6, doing a distro install of pcntl makes it available from the
|
||||
|
|
Loading…
Reference in a new issue