From 1983bdc5562611dc9142ad623071f40d076cf685 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 1 Nov 2005 07:20:46 +0000 Subject: [PATCH] added checks for: - file_uploads = On (required for filemanager(s)) - PEAR installed (required by SyncML & iCal import+export of calendar) - PEAR::Log installed (required by SyncML) --- setup/check_install.php | 63 +++++++++++++++++++++++++++++++++------- setup/lang/phpgw_de.lang | 4 +++ setup/lang/phpgw_en.lang | 4 +++ 3 files changed, 61 insertions(+), 10 deletions(-) diff --git a/setup/check_install.php b/setup/check_install.php index 01fde4b347..8f45e2c8b8 100644 --- a/setup/check_install.php +++ b/setup/check_install.php @@ -89,12 +89,17 @@ 'error' => lang('max_execution_time is set to less than 30 (seconds): eGroupWare sometimes needs a higher execution_time, expect occasional failures'), 'safe_mode' => 'max_execution_time = 30' ), + 'file_uploads' => array( + 'func' => 'php_ini_check', + 'value' => 1, + 'verbose_value' => 'On', + 'error' => lang('File uploads are switched off: You can NOT use any of the filemanagers, nor can you attach files in several applications!'), + ), 'include_path' => array( 'func' => 'php_ini_check', 'value' => '.', 'check' => 'contain', 'error' => lang('include_path need to contain "." - the current directory'), - 'save_mode' => 'max_execution_time = 30' ), 'mysql' => array( 'func' => 'extension_check', @@ -135,6 +140,17 @@ 'func' => 'extension_check', 'warning' => '
' . lang('The session extension is needed to use php sessions (db-sessions work without).') . "
" ), + '' => array( + 'func' => 'pear_check', + 'warning' => '
' . lang('PEAR is needed by SyncML or the iCal import+export of calendar.') . "
" + ), + 'Log' => array( + 'func' => 'pear_check', + 'warning' => '
' . lang('PEAR::Log is needed by SyncML.') . "
" + ), + 'gd' => array( + 'func' => 'gd_check', + ), '.' => array( 'func' => 'permission_check', 'is_world_writable' => False, @@ -145,18 +161,11 @@ 'is_world_readable' => False, 'only_if_exists' => @$GLOBALS['egw_info']['setup']['stage']['header'] != 10 ), - 'phpgwapi/images' => array( - 'func' => 'permission_check', - 'is_writable' => True - ), 'fudforum' => array( 'func' => 'permission_check', 'is_writable' => True, 'only_if_exists' => True ), - 'gd' => array( - 'func' => 'gd_check' - ) ); // some constants for pre php4.3 @@ -169,6 +178,40 @@ define('PHP_SHLIB_PREFIX',PHP_SHLIB_SUFFIX == 'dll' ? 'php_' : ''); } + function pear_check($package,$args) + { + global $passed_icon, $warning_icon; + static $pear_available = null; + + if (is_null($pear_available)) + { + $pear_available = include('PEAR.php'); + + if (!class_exists('PEAR')) $pear_available = false; + + echo '
'.($pear_available ? $passed_icon : $warning_icon).' '. + lang('Checking PEAR%1 is installed','').': '.($pear_available ? lang('True') : lang('False'))."
\n"; + } + if ($pear_available && $package) + { + $available = include($package.'.php'); + + if (!class_exists($package)) $available = false; + + echo '
'.($available ? $passed_icon : $warning_icon).' '. + lang('Checking PEAR%1 is installed','::'.$package).': '.($available ? lang('True') : lang('False'))."
\n"; + } + $available = $pear_available && (!$package || $available); + + if (!$available) + { + echo $args['warning']; + } + echo "\n"; + + return $available; + } + function extension_check($name,$args) { global $passed_icon, $error_icon, $warning_icon, $is_windows; @@ -445,6 +488,7 @@ function gd_check() { global $passed_icon, $warning_icon; + $available = (function_exists('imagecopyresampled') || function_exists('imagecopyresized')); echo "
".($available ? $passed_icon : $warning_icon).' '.lang('Checking for GD support...').': '.($available ? lang('True') : lang('False'))."
\n"; @@ -452,9 +496,8 @@ 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; + return $available; } if ($run_by_webserver) diff --git a/setup/lang/phpgw_de.lang b/setup/lang/phpgw_de.lang index fffa9fd64c..4d694b268d 100644 --- a/setup/lang/phpgw_de.lang +++ b/setup/lang/phpgw_de.lang @@ -88,6 +88,7 @@ check ip address of all sessions setup de IP Adresse bei allen Sessions checking extension %1 is loaded or loadable setup de Überprüfe ob die Erweiterung %1 geladen oder ladbar ist checking file-permissions of %1 for %2 %3: %4 setup de Überprüfe Datei Zugriffsrechte von %1 für %2 %3: %4 checking for gd support... setup de Überprüfe die GD Unterstützung... +checking pear%1 is installed setup de Überprüfe ob PEAR%1 installiert ist checking php.ini setup de Überprüfe die php.ini Datei checking the egroupware installation setup de Überprüfe die eGroupWare-Installation click here to return to setup. setup de Hier klicken um zu Setup zurück zu kehren. @@ -190,6 +191,7 @@ export sql users to ldap setup de SQL-Benutzer in LDAP exportieren false setup de Falsch file setup de DATEI file type, size, version, etc. setup de Dateityp, Größe, Version usw. +file uploads are switched off: you can not use any of the filemanagers, nor can you attach files in several applications! setup de Dateiuploads sind ausgeschaltet. Sie können keinen der Dateimanager verwenden, noch können Sie in verschiedenen Anwendungen Dateien anhängen! filename setup de Dateiname for a new install, select import. to convert existing sql accounts to ldap, select export setup de Für eine Neuinstallation, wählen Sie importieren. Um existierende SQL-Accounts zu LDAP zu konvertieren, wählen Sie exportieren. force selectbox setup de Auswahl erzwingen @@ -319,6 +321,8 @@ password of db user setup de Passwort des Datenbank Benutzers passwords did not match, please re-enter setup de Passworte stimmten nicht überein, bitte nocheinmal eingeben path information setup de Pfadinformationen path to user and group files has to be outside of the webservers document-root!!! setup de Pfad zu Benutzer und Gruppen Dateien MUSS AUSSERHALB des Wurzelverzeichnisses (document root) des Webservers sein!!! +pear is needed by syncml or the ical import+export of calendar. setup de PEAR wird von SyncML oder dem iCal Import+Export des Kalenders benötigt. +pear::log is needed by syncml. setup de PEAR wird von SyncML benötigt. persistent connections setup de Permanente Verbindungen php plus restore setup de PHP plus Wiederherstellen php plus restore gives by far the best performance, as it stores the egw enviroment completly in the session. setup de PHP plus Wiederherstellen gibt bei weitem die beste Performanze. Es speichert die eGW Umgebung komplett in der Session. diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index 799479d118..c9eef980c9 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -88,6 +88,7 @@ check ip address of all sessions setup en check ip address of all sessions checking extension %1 is loaded or loadable setup en Checking extension %1 is loaded or loadable checking file-permissions of %1 for %2 %3: %4 setup en Checking file-permissions of %1 for %2 %3: %4 checking for gd support... setup en Checking for GD support... +checking pear%1 is installed setup en Checking PEAR%1 is installed checking php.ini setup en Checking php.ini checking the egroupware installation setup en Checking the eGroupWare Installation click here to return to setup. setup en click here to return to setup. @@ -190,6 +191,7 @@ export sql users to ldap setup en Export SQL users to LDAP false setup en False file setup en FILE file type, size, version, etc. setup en file type, size, version, etc. +file uploads are switched off: you can not use any of the filemanagers, nor can you attach files in several applications! setup en File uploads are switched off: You can NOT use any of the filemanagers, nor can you attach files in several applications! filename setup en filename for a new install, select import. to convert existing sql accounts to ldap, select export setup en For a new install, select import. To convert existing SQL accounts to LDAP, select export force selectbox setup en Force Selectbox @@ -319,6 +321,8 @@ password of db user setup en Password of db user passwords did not match, please re-enter setup en Passwords did not match, please re-enter path information setup en Path information path to user and group files has to be outside of the webservers document-root!!! setup en Path to user and group files HAS TO BE OUTSIDE of the webservers document-root!!! +pear is needed by syncml or the ical import+export of calendar. setup en PEAR is needed by SyncML or the iCal import+export of calendar. +pear::log is needed by syncml. setup en PEAR::Log is needed by SyncML. persistent connections setup en Persistent connections php plus restore setup en PHP plus restore php plus restore gives by far the best performance, as it stores the egw enviroment completly in the session. setup en PHP plus restore gives by far the best performance, as it stores the eGW enviroment completly in the session.