From 8bbe9d0ecb9c725f78c6565af85d83954f8137f8 Mon Sep 17 00:00:00 2001 From: till Date: Sun, 3 Feb 2008 14:23:17 +0000 Subject: * added more checks --- check.php | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/check.php b/check.php index 865ba7ace..8e0558e23 100644 --- a/check.php +++ b/check.php @@ -72,6 +72,7 @@ foreach ($create_files AS $file) { echo '

Check supplied DB settings

'; @include $path . 'config/db.inc.php'; +$db_working = false; if (isset($rcmail_config)) { echo 'DB settings: '; include_once 'MDB2.php'; @@ -79,6 +80,7 @@ if (isset($rcmail_config)) { if (!MDB2::IsError($db)) { echo 'OK'; $db->disconnect(); + $db_working = true; } else { echo 'NOT OK'; } @@ -87,12 +89,32 @@ if (isset($rcmail_config)) { echo 'Could not open db.inc.php config file, or file is empty.
'; } +echo '

TimeZone

'; +echo 'Status: '; +if ($db_working === true) { + require_once 'include/rcube_mdb2.inc'; + $DB = new $dbclass($rcmail_config['db_dsnw'], '', false); + $DB->db_connect('w'); + + $tz_db = $DB->unixtimestamp(); + $tz_local = time(); + if ($tz_db != $tz_local) { + echo 'NOT OK'; + } else { + echo 'OK'; + } +} else { + echo 'Could not test (fix DB first).'; +} +echo '
'; + echo '

Checking .ini settings

'; $auto_start = ini_get('session.auto_start'); $file_uploads = ini_get('file_uploads'); -echo "session.auto_start: "; +echo '

session.auto_start

'; +echo 'status: '; if ($auto_start == 1) { echo 'NOT OK'; } else { @@ -100,11 +122,31 @@ if ($auto_start == 1) { } echo '
'; -echo "file_uploads: "; +echo '

file_uploads

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

session.save_path

'; +echo 'status: '; +$save_path = ini_get('session.save_path'); +if (empty($save_path)) { + echo 'NOT OK'; +} else { + echo "OK: $save_path"; + if (!file_exists($save_path)) { + echo ', but it does not exist'; + } else { + if (!is_readable($save_path) || !is_writable($save_path)) { + echo ', but permissions to read and/or write are missing'; + } + } +} echo '
'; -?> + */ +?> \ No newline at end of file -- cgit v1.2.3