mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Errors with missing posix extension (#7666)
* fix: errors with missing posix extension It should be an optional dependency * add php71w-process to the CentOS 7 install docs
This commit is contained in:
committed by
Neil Lathwood
parent
301af24ace
commit
b79d106c56
@@ -65,6 +65,13 @@ class Php implements ValidationGroup
|
||||
$validator->fail("Missing CLI PHP extension: $extension", "Please install $extension");
|
||||
}
|
||||
}
|
||||
|
||||
$suggested_extensions = array('posix' => 'php-process');
|
||||
foreach ($suggested_extensions as $extension => $packages) {
|
||||
if (!extension_loaded($extension)) {
|
||||
$validator->warn("Missing optional PHP extension: $extension", "It is suggested you install $packages or the one that matches your php version");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function checkFunctions(Validator $validator)
|
||||
|
@@ -49,7 +49,7 @@ class User implements ValidationGroup
|
||||
if (isCli()) {
|
||||
$validator->fail('You need to run this script as root' .
|
||||
(Config::has('user') ? ' or ' . $lnms_username : ''));
|
||||
} else {
|
||||
} elseif (function_exists('posix_getgrnam')) {
|
||||
$lnms_group = posix_getgrnam($lnms_groupname);
|
||||
if (!in_array($username, $lnms_group['members'])) {
|
||||
$validator->fail(
|
||||
|
Reference in New Issue
Block a user