X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=setup%2Fclass_setupStep_Checks.inc;h=99e34ddfae8c9e709f63f949c21a39d4c696d11e;hb=a26e30f68ebeebd69d33547806568a2efb38b84b;hp=bf25f7bda1d0d513bed76519589841e4de4d097d;hpb=42c9397a46d8add001150d77f723154eb1869221;p=gosa.git diff --git a/setup/class_setupStep_Checks.inc b/setup/class_setupStep_Checks.inc index bf25f7bda..99e34ddfa 100644 --- a/setup/class_setupStep_Checks.inc +++ b/setup/class_setupStep_Checks.inc @@ -36,8 +36,8 @@ class Step_Checks extends setup_step function update_strings() { $this->s_title = _("Installation check"); - $this->s_title_long = _("Basic installation checks"); - $this->s_info = _("Some basic checks for PHP version, ldap extension..."); + $this->s_title_long = _("Installation check"); + $this->s_info = _("Basic checks for PHP version and required extensions."); } @@ -62,24 +62,24 @@ class Step_Checks extends setup_step /* PHP version check */ $N = _("Checking PHP version"); - $D = sprintf(_("PHP must be of version %s or %s or above for some functions."),"4.3.10","5.2.0"); - $S = _("GOsa requires functions that may not be available in older PHP versions, just update to a supported PHP version."); + $D = sprintf(_("PHP must be of version %s or above."), "5.2.0"); + $S = _("GOsa requires functionality that is not available (or buggy) in older PHP versions. Please update to a supported version."); $R = $this->check_php_version(); $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Checking imap extension */ - $N = _("Checking for ldap module"); - $D = _("This is the main module used by GOsa and therefore really required."); - $S = _("The ldap module (PHP4-ldap/PHP5-ldap) is required to communicate with your ldap server."); + $N = _("Checking for LDAP support"); + $D = _("This is the main extension used by GOsa and therefore really required."); + $S = _("The ldap extension (php5-ldap) is required to communicate with your LDAP server."); $R = is_callable("ldap_bind"); $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Check for gettext support */ $N = _("Checking for gettext support"); - $D = _("Gettext support is required for internationalized GOsa."); - $S = _("This should be activated while compiling your PHP. (--with-gettext)"); + $D = _("Gettext support is required for internationalization."); + $S = _("Please make sure that the extension is activated."); $R = is_callable("bindtextdomain"); $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); @@ -87,45 +87,45 @@ class Step_Checks extends setup_step /* Checing for iconv */ $N = _("Checking for iconv support"); $D = _("This module is used by GOsa to convert samba munged dial informations and is therefore required. "); - $S = _("This should be activated while compiling your PHP. (--with-iconv)"); + $S = _("Please make sure that the extension is activated."); $R = is_callable("iconv"); $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Check for installed mhash module */ - $N = _("Checking for mhash module"); - $D = _("To use SSHA encryption, you'll need this module. GOsa will run without it."); - $S = _("The mhash module for PHP 4/5 is not available, please install it. (php4-mhash/php5-mhash)"); + $N = _("Checking for mhash support"); + $D = _("You'll need this module to make use of SSHA encryption"); + $S = _("The mhash module for PHP 5 is not available.Please install php5-mhash."); $R = is_callable("mhash"); $M = FALSE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Is imap module available */ - $N = _("Checking for imap module"); - $D = _("The IMAP module is needed to communicate with the IMAP server. It gets status informations, creates and deletes mail users."); - $S = _("This module is used to communicate with your mail server. Please install (PHP4-imap PHP5-imap)"); + $N = _("Checking for IMAP support"); + $D = _("The IMAP module is needed to communicate with the IMAP server. GOsa retrieves status information, creates and deletes mail users, etc."); + $S = _("This module is used to communicate with your mail server. Please install php5-imap."); $R = is_callable("imap_open"); $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Check getacl in imap module */ - $N = _("Checking for getacl in imap"); - $D = _("The getacl support is needed for shared folder permissions. The standard IMAP module is not capable of reading acl's. You need a recend PHP version for this feature."); + $N = _("Checking for getacl in IMAP implementation"); + $D = _("The getacl support is needed to handle shared folder permissions. Old IMAP extensions are not capable of reading acl's. You need a recent PHP version to use this feature."); $S = $D; $R = is_callable("imap_getacl"); $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Mysql module loaded ? */ - $N = _("Checking for mysql module"); - $D = _("MySQL support is needed for reading GOfax reports from databases."); - $S = _("This module is required to communicate with database servers, for example used in phone and fax addons. Please install (PHP4-mysql PHP5-mysql)"); + $N = _("Checking for MySQL support"); + $D = _("MySQL support is needed to communicate with several supported databases."); + $S = _("This module is required to communicate with database servers (GOfax, asterisk, GLPI, etc.). Please install php5-mysql"); $R = is_callable("mysql_query"); $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Checking for kadm5 module */ - $N = _("Checking for kadm5 module"); + $N = _("Checking for kadm5 support"); $D = _("Managing users in kerberos requires the kadm5 module which is downloadable via PEAR network."); $S = _("This module is required to manage user in kerberos, it is downloadable via PEAR network"); $R = is_callable("kadm5_init_with_password"); @@ -133,16 +133,16 @@ class Step_Checks extends setup_step $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Snmp module available ? */ - $N = _("Checking for snmp Module"); - $D = _("Simple Network Management Protocol (SNMP) is required for client monitoring."); - $S = _("This module is required for client monitoring. (PHP4-snmp/PHP5-snmp)"); + $N = _("Checking for SNMP support"); + $D = _("The simple network management protocol is needed to get status information from clients."); + $S = _("This module is required for client monitoring. Please install php5-snmp."); $R = is_callable("snmpget"); $M = FALSE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Checking for Cups module */ - $N = _("Checking for cups module"); - $D = _("In order to read available printers from IPP protocol instead of printcap files, you've to install the CUPS module."); + $N = _("Checking for CUPS support"); + $D = _("In order to read available printers via the IPP protocol instead of printcap files, you've to install the CUPS module."); $S = $D; $R = is_callable("cups_get_dest_list"); $M = FALSE; @@ -152,7 +152,7 @@ class Step_Checks extends setup_step $query= "LC_ALL=C LANG=C fping -v 2>&1"; $output= shell_exec ($query); $N = _("Checking for fping utility"); - $D = _("The fping utility is only used if you've got a thin client based terminal environment running."); + $D = _("The fping utility is used if you've got a thin client based terminal environment."); $S = _("The fping utility is only used in thin client based terminal environment."); $R = preg_match("/^fping:/", $output); $M = FALSE; @@ -168,9 +168,9 @@ class Step_Checks extends setup_step $have_mkntpwd |= ($ret == 0); } - $N = _("Password hashes"); - $D = _("In order to use SAMBA 2/3, you've to install some additional packages to generate password hashes."); - $S = _("In order to use samba 2/3 you've to install some additional packages to generate password hashes. (e.g. libmhash2)"); + $N = _("SAMBA password hash generation"); + $D = _("In order to use SAMBA 2/3 passwords, you've to install additional packages to generate password hashes."); + $S = _("In order to use SAMBA 2/3 you've to install additional perl libraries. Take a look at mkntpasswd."); $R = $have_mkntpwd; $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); @@ -180,8 +180,8 @@ class Step_Checks extends setup_step */ /* Register_globals off */ - $N = _("register_globals"." ".""._("Off").""); - $D = _("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."); + $N = "register_globals = "._("Off").""; + $D = _("register_globals is a PHP mechanism to register all global variables to be accessible from scripts without changing the scope. This may be a security risk."); $S = _("Search for 'register_globals' in your php.ini and switch it to 'Off'."); $R = ini_get("register_globals") == 0; $M = FALSE; @@ -189,9 +189,9 @@ class Step_Checks extends setup_step /* session lifetime set to >=86400 seconds ? */ - $N = ("session.gc_maxlifetime"." "." >= 86400"); - $D = _("PHP uses this value for the garbage collector to delete old sessions.")." ". - _("Setting this value to one day will prevent loosing session and cookie before they really timeout."); + $N = "session.gc_maxlifetime >= 86400"; + $D = _("PHP uses this value for the garbage collector to delete old sessions.")." ". + _("Setting this value to one day will prevent loosing session and cookies before they really timeout."); $S = _("Search for 'session.gc_maxlifetime' in your php.ini and set it to 86400 or higher."); $R = ini_get("session.gc_maxlifetime") >= 86400; $M = FALSE; @@ -199,61 +199,69 @@ class Step_Checks extends setup_step /* Session auto start must be turned off */ $session_auto_start = ini_get('session.auto_start'); - $N = _("session.auto_start"." ".""._("Off").""); - $D = _("In Order to use GOsa without any trouble, the session.auto_register option in your php.ini must be set to 'Off'."); + $N = "session.auto_start = "._("Off").""; + $D = _("In Order to use GOsa without any trouble, the session.auto_register option in your php.ini should be set to 'Off'."); $S = _("Search for 'session.auto_start' in your php.ini and set it to 'Off'."); $R = !$session_auto_start['local_value']; $M = TRUE; $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Check if memory limit is set to 32 or > */ - $N = _("memory_limit")." "." >= 32"; - $D = _("GOsa needs at least 32MB of memory, less will cause unpredictable errors! Increase it for larger setups."); + $N = "memory_limit >= 32"; + $D = _("GOsa needs at least 32MB of memory. Setting it below this limit may cause errors that are not reproducable! Increase it for larger setups."); $S = _("Search for 'memory_limit' in your php.ini and set it to '32M' or higher."); $R = ini_get('memory_limit') >= 32 ; $M = TRUE; $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Implicit Flush disabled can increase performance */ - $N = _("implicit_flush")." ".""._("Off").""; - $D = _("This option influences the Output handling. Turn this Option off, to increase performance."); + $N = "implicit_flush = "._("Off").""; + $D = _("This option influences the PHP output handling. Turn this Option off, to increase performance."); $S = _("Search for 'implicit_flush' in your php.ini and set it to 'Off'."); - $R = ini_get('implicit_flush'); + $R = !ini_get('implicit_flush'); $M = FALSE; $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Check if execution time is set to 30 */ - $N = _("max_execution_time")." "." >= 30"; - $D = _("The Execution time should be at least 30 seconds, because some actions may consume more time."); + $N = "max_execution_time >= 30"; + $D = _("The Execution time should be at least 30 seconds."); $S = _("Search for 'max_execution_time' in your php.ini and set it to '30' or higher."); $R = ini_get("max_execution_time") >= 30 ; $M = TRUE; $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Expose php should be set to off */ - $N = _("expose_php")." "._("Off").""; - $D = _("Increase the server security by setting expose_php to 'off'. PHP won't send any Information about the server you are running in this case."); + $N = "expose_php = "._("Off").""; + $D = _("Increase the server security by setting expose_php to 'off'. PHP won't send any information about the server you are running in this case."); $S = _("Search for 'expose_php' in your php.ini and set if to 'Off'."); $R = !ini_get("expose_php"); $M = FALSE; $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* Automatic quoting must be turned on */ - $N = _("magic_quotes_gpc")." "._("On").""; - $D = _("Increase your server security by setting magic_quotes_gpc to 'on'. PHP will escape all quotes in strings in this case."); + $N = "magic_quotes_gpc = "._("On").""; + $D = _("Increase your server security by setting magic_quotes_gpc to 'on'. PHP will escape all quotes in strings in this case."); $S = _("Search for 'magic_quotes_gpc' in your php.ini and set it to 'On'."); $R = ini_get('magic_quotes_gpc'); $M = TRUE; $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); + /* Emulating old stuff? */ + $N = "zend.ze1_compatibility_mode = "._("Off").""; + $D = _("Increase your server performance by setting magic_quotes_gpc to 'off'."); + $S = _("Search for 'zend.ze1_compatibility_mode' in your php.ini and set it to 'Off'."); + $R = !ini_get('zend.ze1_compatibility_mode'); + $M = FALSE; + $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); + /* Configuration file */ /* Check if we can create a config file.*/ - $N = _("Configuration file writeable."); - $D = _("The Configuration file can't be written"); - $S = sprintf(_("The GOsa reads its configuration from a file located in (%s/%s). The setup can write the configuration directly in this file, if it is writeable."),CONFIG_DIR,CONFIG_FILE); + $N = _("Configuration writeable"); + $D = _("The configuration file can't be written"); + $S = sprintf(_("GOsa reads its configuration from a file located in (%s/%s). The setup can write the configuration directly if it is writeable."),CONFIG_DIR,CONFIG_FILE); $R = ( file_exists(CONFIG_DIR."/".CONFIG_FILE) && is_writeable(CONFIG_DIR."/".CONFIG_FILE)) // is there a config file ? || (!file_exists(CONFIG_DIR."/".CONFIG_FILE) && is_writeable(CONFIG_DIR)); // There is non, but can we create a file there ? $M = FALSE; @@ -296,11 +304,7 @@ class Step_Checks extends setup_step with the current version of GOsa */ function check_php_version() { - if(preg_match("/^5/",phpversion())){ - return(version_compare(phpversion(),"5.2.0",">=")); - }else{ - return(version_compare(phpversion(),"4.3.10",">=")); - } + return(version_compare(phpversion(),"5.2.0",">=")); } }