1
0
Fork 0
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:
epriestley 2011-08-31 10:50:40 -07:00
parent 9dde79a732
commit 40c1450129

View file

@ -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