From 112fdac3ba97e5a3844470d2ee2085c6a474d9c3 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Wed, 22 Jun 2011 13:28:23 +0200 Subject: [PATCH] bacula-web: php version check added to test page --- gui/bacula-web/test.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gui/bacula-web/test.php b/gui/bacula-web/test.php index 16e2bace20..139031a45e 100644 --- a/gui/bacula-web/test.php +++ b/gui/bacula-web/test.php @@ -39,7 +39,10 @@ 'check_descr' => 'PHP PostgreSQL support must be installed in order to run bacula-web with PostgreSQL bacula catalog'), array( 'check_cmd' => 'smarty-cache', 'check_label' => 'Smarty cache folder write permission', - 'check_descr' => 'Smarty template engine need write permissions to templates_c folder') + 'check_descr' => 'Smarty template engine need write permissions to templates_c folder'), + array( 'check_cmd' => 'php-version', + 'check_label' => 'PHP version', + 'check_descr' => 'PHP version must be at least 5.0.0 (current = ' . PHP_VERSION . ')' ) ); // Doing all checks @@ -64,6 +67,11 @@ case 'smarty-cache': $check['check_result'] = $check_result[ is_writable( "./templates_c" ) ]; break; + case 'php-version': + $phpversion = explode( '.', PHP_VERSION ); + $phpversion = $phpversion[0]; + $check['check_result'] = $check_result[ $phpversion >= 5 ]; + break; } } -- 2.39.5