From: hickert Date: Fri, 20 May 2005 12:42:20 +0000 (+0000) Subject: PHP5 version check X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=61f1d25fcb9ea6781cc51111762c32b4ce2fdda2;p=gosa.git PHP5 version check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@284 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/setup_checks.inc b/include/setup_checks.inc index 1bb04b8e7..7003058e8 100644 --- a/include/setup_checks.inc +++ b/include/setup_checks.inc @@ -1,6 +1,32 @@ = $c1) $c1 = $c2; + + for($i=0; $i < $c1 ; $i++) + { + if($needver[$i] > $curver[$i]) + { + return(false); + } + if($needver[$i] < $curver[$i]) + { + return(true); + } + } +} + +function minimum_versioni2($vercheck) { $minver = (int)str_replace('.', '', $vercheck); $curver = (int)str_replace('.', '', phpversion()); @@ -234,6 +260,11 @@ function perform_php_checks(&$faults) _("PHP must be of version 4.1.0 or above for some functions and known bugs in PHP language."), minimum_version('4.1.0')); + $msg.= check ( $faults, _("Checking for PHP version (<=5)"), + _("PHP must be below version 5."), + !minimum_version('5')); + + $msg.= check ( $faults, _("Checking if register_globals is set to 'off'"), _("register_globals is a PHP mechanism to register all global varibales to be accessible from scripts without changing the scope. This may be a security risk. GOsa will run in both modes."), $check_globals == 0, FALSE);