- 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
This commit is contained in:
Ralf Becker 2004-08-17 16:55:42 +00:00
parent 49b3f025bd
commit 7bac819526
3 changed files with 22 additions and 7 deletions

View File

@ -122,6 +122,12 @@
'func' => 'extension_check',
'warning' => '<div id="setup_info">' . lang('The mbstring extension is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "</div>"
),
'mbstring.func_overload' => array(
'func' => 'php_ini_check',
'value' => 7,
'warning' => '<div id="setup_info">' . lang('The mbstring.func_overload = 7 is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "</div>",
'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' => '<div id="setup_info">' . lang('The imap extension is needed by the two email apps (even if you use email with pop3 as protocoll).') . '</div>'
@ -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').": <div id='setup_info'>$name $check $verbose_value: ini_get('$name')='$ini_value'$ini_value_verbose</div>\n";
$msg = ' '.lang('Checking php.ini').": $name $check $verbose_value: <div id='setup_info'>ini_get('$name')='$ini_value'$ini_value_verbose</div>\n";
if ($result)
{
@ -394,9 +405,9 @@
{
echo $error_icon.$msg."<br/></span>";
}
echo "<span id='setup_error'>\n";
echo "<div id='setup_error'>\n";
echo '*** '.lang('Please make the following change in your php.ini').' ('.get_php_ini().'): '.(@$args['safe_mode']?$args['safe_mode']:$args['change'])."<br>\n";
echo '*** '.lang('AND reload your webserver, so the above changes take effect !!!')."<br></span>\n";
echo '*** '.lang('AND reload your webserver, so the above changes take effect !!!')."</div>\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)

View File

@ -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. <br>please check your ldap server configuration setup de Es gab ein Problem bei dem Versuch, eine Verbindung mit Ihrem LDAP-Server aufzubauen. <br>Bitte &uuml;berpr&uuml;fen Sie die Konfiguration Ihres LDAP-Servers.

View File

@ -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. <br> setup en There was a problem trying to connect to your LDAP server. <br>