diff options
Diffstat (limited to 'net-mgmt/librenms/files/patch-LibreNMS_Validations_Php.php')
-rw-r--r-- | net-mgmt/librenms/files/patch-LibreNMS_Validations_Php.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net-mgmt/librenms/files/patch-LibreNMS_Validations_Php.php b/net-mgmt/librenms/files/patch-LibreNMS_Validations_Php.php index b73ea42009c6..1f365fa8bb91 100644 --- a/net-mgmt/librenms/files/patch-LibreNMS_Validations_Php.php +++ b/net-mgmt/librenms/files/patch-LibreNMS_Validations_Php.php @@ -5,7 +5,7 @@ $web_version = PHP_VERSION; - $cli_version = rtrim(shell_exec('php -r "echo PHP_VERSION;"')); -+ $cli_version = rtrim(shell_exec('/usr/local/bin/php -r "echo PHP_VERSION;"')); ++ $cli_version = rtrim(shell_exec('%%LOCALBASE%%/bin/php -r "echo PHP_VERSION;"')); if (version_compare($web_version, $cli_version, '!=')) { $validator->fail("PHP version of your webserver ($web_version) does not match the cli version ($cli_version)", "If you updated PHP recently, restart php-fpm or apache to switch to the new version"); } @@ -14,7 +14,7 @@ $sh_tz = rtrim(shell_exec('date +%Z')); $php_tz = date('T'); - $php_cli_tz = rtrim(shell_exec('php -r "echo date(\'T\');"')); -+ $php_cli_tz = rtrim(shell_exec('/usr/local/bin/php -r "echo date(\'T\');"')); ++ $php_cli_tz = rtrim(shell_exec('%%LOCALBASE%%/bin/php -r "echo date(\'T\');"')); if (empty($ini_tz)) { // make sure timezone is set @@ -23,7 +23,7 @@ // some distros have different php.ini for cli and the web server if ($sh_tz !== $php_cli_tz) { - $ini_file = rtrim(shell_exec('php -r "echo php_ini_loaded_file();"')); -+ $ini_file = rtrim(shell_exec('/usr/local/bin/php -r "echo php_ini_loaded_file();"')); ++ $ini_file = rtrim(shell_exec('%%LOCALBASE%%/bin/php -r "echo php_ini_loaded_file();"')); $validator->fail( "The CLI php.ini ($php_cli_tz) timezone is different than your system's timezone ($sh_tz)", "Edit your CLI ini file $ini_file and set the correct timezone ($sh_tz)." |