From 7bac8195260529eea67e618a133ca1a69dbe15df Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 17 Aug 2004 16:55:42 +0000 Subject: [PATCH] - added a check for mbstring.func_overload = 7 - fixed handling memory values with M or K - corrected display of message "Please fix the above errors and warning" - fixed some formating --- setup/check_install.php | 27 ++++++++++++++++++++------- setup/lang/phpgw_de.lang | 1 + setup/lang/phpgw_en.lang | 1 + 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/setup/check_install.php b/setup/check_install.php index 0df5ce8292..ed0a0c7dca 100644 --- a/setup/check_install.php +++ b/setup/check_install.php @@ -122,6 +122,12 @@ 'func' => 'extension_check', 'warning' => '
' . lang('The mbstring extension is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "
" ), + 'mbstring.func_overload' => array( + 'func' => 'php_ini_check', + 'value' => 7, + 'warning' => '
' . lang('The mbstring.func_overload = 7 is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "
", + 'change' => extension_loaded('mbstring') || function_exists('dl') && @dl(PHP_SHLIB_PREFIX.'mbstring.'.PHP_SHLIB_SUFFIX) ? 'mbstring.func_overload = 7' : '', + ), 'imap' => array( 'func' => 'extension_check', 'warning' => '
' . lang('The imap extension is needed by the two email apps (even if you use email with pop3 as protocoll).') . '
' @@ -150,7 +156,7 @@ ) ); - // some constanst for pre php4.3 + // some constants for pre php4.3 if (!defined('PHP_SHLIB_SUFFIX')) { define('PHP_SHLIB_SUFFIX',$is_windows ? 'dll' : 'so'); @@ -332,6 +338,13 @@ return $Ok; } + function mk_value($value) + { + if (!preg_match('/^([0-9]+)([mk]+)$/i',$value,$matches)) return $value; + + return (strtolower($matches[2]) == 'm' ? 1024*1024 : 1024) * (int) $matches[1]; + } + function php_ini_check($name,$args) { global $passed_icon, $error_icon, $warning_icon, $is_windows; @@ -358,9 +371,7 @@ break; case '>=': $result = !$ini_value || // value not used, eg. no memory limit - intval($ini_value) >= intval($args['value']) && - ($args['value'] == intval($args['value']) || - substr($args['value'],-1) == substr($ini_value,-1)); + (int) mk_value($ini_value) >= (int) mk_value($args['value']); break; case 'contain': $check = lang('contain'); @@ -372,7 +383,7 @@ $result = $ini_value == $args['value']; break; } - $msg = ' '.lang('Checking php.ini').":
$name $check $verbose_value: ini_get('$name')='$ini_value'$ini_value_verbose
\n"; + $msg = ' '.lang('Checking php.ini').": $name $check $verbose_value:
ini_get('$name')='$ini_value'$ini_value_verbose
\n"; if ($result) { @@ -394,9 +405,9 @@ { echo $error_icon.$msg."
"; } - echo "\n"; + echo "
\n"; echo '*** '.lang('Please make the following change in your php.ini').' ('.get_php_ini().'): '.(@$args['safe_mode']?$args['safe_mode']:$args['change'])."
\n"; - echo '*** '.lang('AND reload your webserver, so the above changes take effect !!!')."
\n"; + echo '*** '.lang('AND reload your webserver, so the above changes take effect !!!')."
\n"; } } return $result; @@ -422,7 +433,9 @@ if (!$available) { echo lang('Your PHP installation does not have appropriate GD support. You need gd library version 1.8 or newer to see Gantt charts in projects.')."\n"; + return false; } + return true; } if ($run_by_webserver) diff --git a/setup/lang/phpgw_de.lang b/setup/lang/phpgw_de.lang index 980a1856f0..b0a070ccd3 100644 --- a/setup/lang/phpgw_de.lang +++ b/setup/lang/phpgw_de.lang @@ -377,6 +377,7 @@ the first step in installing egroupware is to ensure your environment has the ne the following applications need to be upgraded: setup de Die folgenden Anwendungen müssen aktualisiert werden: the imap extension is needed by the two email apps (even if you use email with pop3 as protocoll). setup de Die imap Erweiterung (php extension) wird von den beiden Email Applikationen benötigt (auch wenn Sie das POP3-Protokoll verwenden). the mbstring extension is needed to fully support unicode (utf-8) or other multibyte-charsets. setup de Die mbstring Erweiterung (php extension) ist notwendig um Unicode (utf-8) oder andere mehr-byte (multibyte) Zeichensätze vollständig zu unterstützen. +the mbstring.func_overload = 7 is needed to fully support unicode (utf-8) or other multibyte-charsets. setup de Die Einstellung mbstring.func_overload = 7 ist notwendig um Unicode (utf-8) oder andere mehr-byte (multibyte) Zeichensätze vollständig zu unterstützen. the table definition was correct, and the tables were installed setup de Die Tabellen Definition war korrekt und die Tabellen wurden installiert the tables setup de die Tabellen there was a problem tring to connect to your ldap server.
please check your ldap server configuration setup de Es gab ein Problem bei dem Versuch, eine Verbindung mit Ihrem LDAP-Server aufzubauen.
Bitte überprüfen Sie die Konfiguration Ihres LDAP-Servers. diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index 4089fc52db..67b32460c5 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -374,6 +374,7 @@ the first step in installing egroupware is to ensure your environment has the ne the following applications need to be upgraded: setup en The following applications need to be upgraded: the imap extension is needed by the two email apps (even if you use email with pop3 as protocoll). setup en The imap extension is needed by the two email apps (even if you use email with pop3 as protocoll). the mbstring extension is needed to fully support unicode (utf-8) or other multibyte-charsets. setup en The mbstring extension is needed to fully support unicode (utf-8) or other multibyte-charsets. +the mbstring.func_overload = 7 is needed to fully support unicode (utf-8) or other multibyte-charsets. setup en The mbstring.func_overload = 7 is needed to fully support unicode (utf-8) or other multibyte-charsets. the table definition was correct, and the tables were installed setup en The table definition was correct, and the tables were installed the tables setup en the tables there was a problem trying to connect to your ldap server.
setup en There was a problem trying to connect to your LDAP server.