mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use PHP_BINARY directly instead of trying to build path to PHP binary (#13690)
This commit is contained in:
@@ -54,7 +54,7 @@ if (php_sapi_name() == 'cli' && isset($_SERVER['TERM'])) {
|
||||
}
|
||||
|
||||
if (is_file($install_dir . '/composer.phar')) {
|
||||
$exec = PHP_BINDIR . "/php '" . $install_dir . "/composer.phar'";
|
||||
$exec = PHP_BINARY . " '" . $install_dir . "/composer.phar'";
|
||||
|
||||
// If older than 1 week, try update
|
||||
if (time() - filemtime($install_dir . '/composer.phar') > 60 * 60 * 24 * 7) {
|
||||
@@ -80,8 +80,8 @@ if (is_file($install_dir . '/composer.phar')) {
|
||||
echo "Error: Failed to download $installer_url\n";
|
||||
} elseif (@hash_file('SHA384', $dest) === $good_sha) {
|
||||
// Installer verified
|
||||
shell_exec(PHP_BINDIR . "/php $dest");
|
||||
$exec = PHP_BINDIR . "/php '$install_dir/composer.phar'";
|
||||
shell_exec(PHP_BINARY . " $dest");
|
||||
$exec = PHP_BINARY . " '$install_dir/composer.phar'";
|
||||
} else {
|
||||
echo "Error: Corrupted download, signature doesn't match for $installer_url\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user