summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@php.net>2008-02-03 14:23:17 +0000
committertill <till@php.net>2008-02-03 14:23:17 +0000
commit8bbe9d0ecb9c725f78c6565af85d83954f8137f8 (patch)
tree5f6c13297aafc0679ec1955c6b84a58cce586cf0
parent306175855ab8987b53cd8685469f519eabb1dbc6 (diff)
* added more checks
-rw-r--r--check.php48
1 files 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 '<h3>Check supplied DB settings</h3>';
@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.<br />';
}
+echo '<h3>TimeZone</h3>';
+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 '<br />';
+
echo '<h3>Checking .ini settings</h3>';
$auto_start = ini_get('session.auto_start');
$file_uploads = ini_get('file_uploads');
-echo "session.auto_start: ";
+echo '<h4>session.auto_start</h4>';
+echo 'status: ';
if ($auto_start == 1) {
echo 'NOT OK';
} else {
@@ -100,11 +122,31 @@ if ($auto_start == 1) {
}
echo '<br />';
-echo "file_uploads: ";
+echo '<h4>file_uploads</h4>';
+echo 'status: ';
if ($file_uploads == 1) {
echo 'OK';
} else {
echo 'NOT OK';
}
+
+/*
+ * Probably not needed because we have a custom handler
+echo '<h4>session.save_path</h4>';
+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 '<br />';
-?>
+ */
+?> \ No newline at end of file