diff -r de56132c008d -r bdac73ed481e install/includes/stages/sysreqs.php --- a/install/includes/stages/sysreqs.php Sun Mar 28 21:49:26 2010 -0400 +++ b/install/includes/stages/sysreqs.php Sun Mar 28 23:10:46 2010 -0400 @@ -14,7 +14,7 @@ */ if ( !defined('IN_ENANO_INSTALL') ) - die(); + die(); require_once(ENANO_ROOT . '/install/includes/libenanoinstall.php'); @@ -25,28 +25,28 @@ function run_test($code, $desc, $extended_desc, $warn = false) { - global $failed, $warned; - static $cv = true; - $cv = !$cv; - $val = eval($code); - if($val) - { - if($cv) $color='CCFFCC'; else $color='AAFFAA'; - echo "$descTest passed"; - } elseif(!$val && $warn) { - if($cv) $color='FFFFCC'; else $color='FFFFAA'; - echo "$desc
$extended_descTest passed with warning"; - $warned = true; - } else { - if($cv) $color='FFCCCC'; else $color='FFAAAA'; - echo "$desc
$extended_descTest failed"; - $failed = true; - } + global $failed, $warned; + static $cv = true; + $cv = !$cv; + $val = eval($code); + if($val) + { + if($cv) $color='CCFFCC'; else $color='AAFFAA'; + echo "$descTest passed"; + } elseif(!$val && $warn) { + if($cv) $color='FFFFCC'; else $color='FFFFAA'; + echo "$desc
$extended_descTest passed with warning"; + $warned = true; + } else { + if($cv) $color='FFCCCC'; else $color='FFAAAA'; + echo "$desc
$extended_descTest failed"; + $failed = true; + } } function is_apache() { - $r = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false; - return $r; + $r = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false; + return $r; } $warnings = array(); @@ -59,39 +59,39 @@ // Test: PHP if ( version_compare(PHP_VERSION, '5.2.0', '>=') ) { - $req_php = 'good'; + $req_php = 'good'; } else if ( version_compare(PHP_VERSION, '5.0.0', '>=') ) { - $warnings[] = $lang->get('sysreqs_req_help_php', array('php_version' => PHP_VERSION)); - $req_php = 'warn'; + $warnings[] = $lang->get('sysreqs_req_help_php', array('php_version' => PHP_VERSION)); + $req_php = 'warn'; } else { - $failed = true; - $req_php = 'bad'; + $failed = true; + $req_php = 'bad'; } // Test: Safe Mode $req_safemode = !intval(@ini_get('safe_mode')); if ( !$req_safemode ) { - $warnings[] = $lang->get('sysreqs_req_help_safemode'); - $failed = true; + $warnings[] = $lang->get('sysreqs_req_help_safemode'); + $failed = true; } // Test: MySQL $req_mysql = function_exists('mysql_connect'); if ( $req_mysql ) - $have_dbms = true; + $have_dbms = true; // Test: PostgreSQL $req_pgsql = function_exists('pg_connect'); if ( $req_pgsql ) - $have_dbms = true; + $have_dbms = true; if ( !$have_dbms ) - $failed = true; + $failed = true; // Test: File uploads $req_uploads = intval(@ini_get('file_uploads')); @@ -99,7 +99,7 @@ // Test: ctype validation $req_ctype = function_exists('ctype_digit'); if ( !$req_ctype ) - $failed = true; + $failed = true; // Writability test: config $req_config_w = write_test('config.new.php'); @@ -114,40 +114,40 @@ $req_cache_w = write_test('cache'); if ( !$req_config_w || !$req_htaccess_w || !$req_files_w || !$req_cache_w ) - $warnings[] = $lang->get('sysreqs_req_help_writable'); + $warnings[] = $lang->get('sysreqs_req_help_writable'); if ( !$req_config_w ) - $failed = true; + $failed = true; // Extension test: GD $req_gd = function_exists('imagecreatefrompng') && function_exists('getimagesize') && function_exists('imagecreatetruecolor') && function_exists('imagecopyresampled'); if ( !$req_gd ) - $warnings[] = $lang->get('sysreqs_req_help_gd2'); + $warnings[] = $lang->get('sysreqs_req_help_gd2'); // FS test: ImageMagick $req_imagick = which('convert'); if ( !$req_imagick ) - $warnings[] = $lang->get('sysreqs_req_help_imagemagick'); + $warnings[] = $lang->get('sysreqs_req_help_imagemagick'); $crypto_backend = install_get_crypto_backend(); if ( $crypto_backend == 'none' ) - $warnings[] = $lang->get('sysreqs_req_help_crypto_none'); + $warnings[] = $lang->get('sysreqs_req_help_crypto_none'); else if ( $crypto_backend == 'bcmath' ) - $warnings[] = $lang->get('sysreqs_req_help_crypto_bcmath'); + $warnings[] = $lang->get('sysreqs_req_help_crypto_bcmath'); ?>
-
- '; - ?> - -
+
+ '; + ?> + +

get('sysreqs_heading'); ?>

@@ -157,48 +157,48 @@
'; + echo ''; ?> -
-

get('sysreqs_summary_warn_title'); ?>

-

get('sysreqs_summary_warn_body'); ?>

- -
+
+

get('sysreqs_summary_warn_title'); ?>

+

get('sysreqs_summary_warn_body'); ?>

+ +
-
-

get('sysreqs_err_no_dbms_title'); ?>

-

get('sysreqs_err_no_dbms_body'); ?>

-
+
+

get('sysreqs_err_no_dbms_title'); ?>

+

get('sysreqs_err_no_dbms_body'); ?>

+
-
-

get('sysreqs_summary_pass_title'); ?>

-

get('sysreqs_summary_pass_body'); ?>

-
-
- -
+
+

get('sysreqs_summary_pass_title'); ?>

+

get('sysreqs_summary_pass_body'); ?>

+
+
+ +
-
-

get('sysreqs_summary_fail_title'); ?>

-

get('sysreqs_summary_fail_body'); ?>

-
+
+

get('sysreqs_summary_fail_title'); ?>

+

get('sysreqs_summary_fail_body'); ?>

+
@@ -206,189 +206,189 @@ - + - - ' . $lang->get('sysreqs_req_found') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_found') . ''; + else: + echo ''; + endif; + ?> - - + + - - ' . $lang->get('sysreqs_req_disabled') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_disabled') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get('sysreqs_req_enabled') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_enabled') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get('sysreqs_req_supported') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_supported') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get("sysreqs_req_{$crypto_backend}") . ''; - } - else - { - echo ''; - } - ?> + + ' . $lang->get("sysreqs_req_{$crypto_backend}") . ''; + } + else + { + echo ''; + } + ?> - + - - ' . $lang->get('sysreqs_req_supported') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_supported') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get('sysreqs_req_supported') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_supported') . ''; + else: + echo ''; + endif; + ?> - + - - ' . $lang->get('sysreqs_req_writable') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_writable') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get('sysreqs_req_writable') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_writable') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get('sysreqs_req_writable') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_writable') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get('sysreqs_req_writable') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_writable') . ''; + else: + echo ''; + endif; + ?> - + - - ' . $lang->get('sysreqs_req_supported') . ''; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_supported') . ''; + else: + echo ''; + endif; + ?> - - ' . $lang->get('sysreqs_req_found') . ' (' . htmlspecialchars($req_imagick) . ')'; - else: - echo ''; - endif; - ?> + + ' . $lang->get('sysreqs_req_found') . ' (' . htmlspecialchars($req_imagick) . ')'; + else: + echo ''; + endif; + ?>
get('sysreqs_heading_serverenv'); ?>get('sysreqs_heading_serverenv'); ?>
get('sysreqs_req_apache'); ?>' . $lang->get('sysreqs_req_notfound') . 'get('sysreqs_req_apache'); ?>' . $lang->get('sysreqs_req_notfound') . '
get('sysreqs_req_php'); ?>vget('sysreqs_req_php'); ?>v
get('sysreqs_req_safemode'); ?>' . $lang->get('sysreqs_req_enabled') . 'get('sysreqs_req_safemode'); ?>' . $lang->get('sysreqs_req_enabled') . '
get('sysreqs_req_uploads'); ?>' . $lang->get('sysreqs_req_disabled') . 'get('sysreqs_req_uploads'); ?>' . $lang->get('sysreqs_req_disabled') . '
get('sysreqs_req_ctype'); ?>' . $lang->get('sysreqs_req_unsupported') . 'get('sysreqs_req_ctype'); ?>' . $lang->get('sysreqs_req_unsupported') . '
- get('sysreqs_req_crypto'); ?> - ' . $lang->get("sysreqs_req_notfound") . ' + get('sysreqs_req_crypto'); ?> + ' . $lang->get("sysreqs_req_notfound") . '
get('sysreqs_heading_dbms'); ?>get('sysreqs_heading_dbms'); ?>
get('sysreqs_req_mysql'); ?>' . $lang->get('sysreqs_req_notfound') . 'get('sysreqs_req_mysql'); ?>' . $lang->get('sysreqs_req_notfound') . '
get('sysreqs_req_postgresql'); ?>' . $lang->get('sysreqs_req_notfound') . 'get('sysreqs_req_postgresql'); ?>' . $lang->get('sysreqs_req_notfound') . '
get('sysreqs_heading_files'); ?>get('sysreqs_heading_files'); ?>
- get('sysreqs_req_config_writable'); ?> - ' . $lang->get('sysreqs_req_unwritable') . ' + get('sysreqs_req_config_writable'); ?> + ' . $lang->get('sysreqs_req_unwritable') . '
- get('sysreqs_req_htaccess_writable'); ?>
- get('sysreqs_req_hint_htaccess_writable'); ?> -
' . $lang->get('sysreqs_req_unwritable') . ' + get('sysreqs_req_htaccess_writable'); ?>
+ get('sysreqs_req_hint_htaccess_writable'); ?> +
' . $lang->get('sysreqs_req_unwritable') . '
- get('sysreqs_req_files_writable'); ?> - ' . $lang->get('sysreqs_req_unwritable') . ' + get('sysreqs_req_files_writable'); ?> + ' . $lang->get('sysreqs_req_unwritable') . '
- get('sysreqs_req_cache_writable'); ?> - ' . $lang->get('sysreqs_req_unwritable') . ' + get('sysreqs_req_cache_writable'); ?> + ' . $lang->get('sysreqs_req_unwritable') . '
get('sysreqs_heading_images'); ?>get('sysreqs_heading_images'); ?>
- get('sysreqs_req_gd2'); ?>
- get('sysreqs_req_hint_gd2'); ?> -
' . $lang->get('sysreqs_req_notfound') . ' + get('sysreqs_req_gd2'); ?>
+ get('sysreqs_req_hint_gd2'); ?> +
' . $lang->get('sysreqs_req_notfound') . '
- get('sysreqs_req_imagemagick'); ?>
- get('sysreqs_req_hint_imagemagick'); ?> -
' . $lang->get('sysreqs_req_notfound') . ' + get('sysreqs_req_imagemagick'); ?>
+ get('sysreqs_req_hint_imagemagick'); ?> +
' . $lang->get('sysreqs_req_notfound') . '
@@ -396,20 +396,20 @@ - - - - - -
- - -

- get('meta_lbl_before_continue'); ?>
- • get('sysreqs_objective_scalebacks'); ?>
- • get('license_objective_have_db_info'); ?> -

-
+ + + + + +
+ + +

+ get('meta_lbl_before_continue'); ?>
+ • get('sysreqs_objective_scalebacks'); ?>
+ • get('license_objective_have_db_info'); ?> +

+