summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5726b57)
raw | patch | inline | side by side (parent: 5726b57)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 May 2005 12:42:20 +0000 (12:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 May 2005 12:42:20 +0000 (12:42 +0000) |
include/setup_checks.inc | patch | blob | history |
index 1bb04b8e72e75f215732c7a8703bcadb113a92c8..7003058e8281d57a5d69f7742948066ede4158fa 100644 (file)
--- a/include/setup_checks.inc
+++ b/include/setup_checks.inc
<?php
+
+
+
function minimum_version($vercheck)
+{
+ $needver = split("\.",$vercheck);
+ $curver = split("\.",phpversion());
+
+ $c1 = count($needver);
+ $c2 = count($curver);
+
+ if($c2 >= $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());
_("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);