From 2c47356b9a86fcc0551b29eabdbebadd9e7e31dc Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 21 Feb 2008 19:24:37 +0000 Subject: [PATCH] fixed PHP5 check --- lam/templates/login.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/lam/templates/login.php b/lam/templates/login.php index 59eaf5e1..071621da 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -30,6 +30,25 @@ $Id$ /** status messages */ include_once("../lib/status.inc"); + +// check if PHP >= 5.1 +if (version_compare(phpversion(), '5.1.0') < 0) { + echo "\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n"; + echo "\n \n"; + echo "\n"; + echo "\n"; + echo "LDAP Account Manager\n"; + echo "\n"; + StatusMessage("ERROR", "LAM needs PHP 5 greater or equal as 5.1.0!", "Please upgrade your PHP installation."); + echo "

"; + echo ""; + exit(); +} + + /** security functions */ include_once("../lib/security.inc"); /** self service functions */ @@ -53,10 +72,6 @@ if (! function_exists('gettext') || !function_exists('_')) { if (! function_exists('utf8_decode')) { $criticalErrors[] = array("ERROR", "Your PHP has no XML support!", "Please install the XML extension for PHP."); } -// check if PHP >= 5.1 -if (version_compare(phpversion(), '5.1.0') < 0) { - $criticalErrors[] = array("ERROR", "LAM needs PHP 5 greater or equal as 5.1.0!", "Please upgrade your PHP installation."); -} // check file permissions $writableDirs = array('sess', 'tmp'); for ($i = 0; $i < sizeof($writableDirs); $i++) {