From d7f79515815c64435ebb757dec5f20009694aba0 Mon Sep 17 00:00:00 2001 From: till Date: Fri, 15 Feb 2008 11:55:16 +0000 Subject: * revised .ini checks and added magic_quotes_* --- check.php-dist | 44 ++++++++++---------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) (limited to 'check.php-dist') diff --git a/check.php-dist b/check.php-dist index 49004cb03..842dc2372 100644 --- a/check.php-dist +++ b/check.php-dist @@ -227,45 +227,21 @@ echo '
'; echo '

Checking .ini settings

'; -$auto_start = ini_get('session.auto_start'); -$file_uploads = ini_get('file_uploads'); +$ini_array = array('session.auto_start' => 0, 'file_uploads' => 1, + 'magic_quotes_sybase' => 0, 'magic_quotes_gpc' => 0); -echo '

session.auto_start = 0

'; -echo 'status: '; -if ($auto_start == 1) { - echo CHECK_NOK; -} else { - echo CHECK_OK; -} -echo '
'; +foreach ($ini_array AS $var => $val) { + $status = ini_get($var); -echo '

file_uploads = On

'; -echo 'status: '; -if ($file_uploads == 1) { - echo CHECK_OK; -} else { - echo CHECK_NOK; -} - -/* - * Probably not needed because we have a custom handler -echo '

session.save_path is set

'; -echo 'status: '; -$save_path = ini_get('session.save_path'); -if (empty($save_path)) { - echo CHECK_NOK; -} else { - echo CHECK_OK . ": $save_path"; - if (!file_exists($save_path)) { - echo ', but it does not exist'; + echo "

$var = $val

"; + echo 'status: '; + if ($status != $val) { + echo CHECK_NOK; } else { - if (!is_readable($save_path) || !is_writable($save_path)) { - echo ', but permissions to read and/or write are missing'; - } + echo CHECK_OK; } + echo '
'; } -echo '
'; - */ @include $path . 'config/main.inc.php'; ?> -- cgit v1.2.3