Changeset 1004 in subversion for trunk/roundcubemail/check.php


Ignore:
Timestamp:
Feb 3, 2008 9:23:17 AM (5 years ago)
Author:
till
Message:
  • added more checks
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/check.php

    r982 r1004  
    7373@include $path . 'config/db.inc.php'; 
    7474 
     75$db_working = false; 
    7576if (isset($rcmail_config)) { 
    7677    echo 'DB settings: '; 
     
    8081        echo 'OK'; 
    8182        $db->disconnect(); 
     83        $db_working = true; 
    8284    } else { 
    8385        echo 'NOT OK'; 
     
    8890} 
    8991 
     92echo '<h3>TimeZone</h3>'; 
     93echo 'Status: '; 
     94if ($db_working === true) { 
     95    require_once 'include/rcube_mdb2.inc'; 
     96    $DB = new $dbclass($rcmail_config['db_dsnw'], '', false); 
     97    $DB->db_connect('w'); 
     98     
     99    $tz_db    = $DB->unixtimestamp(); 
     100    $tz_local = time(); 
     101    if ($tz_db != $tz_local) { 
     102        echo 'NOT OK'; 
     103    } else { 
     104        echo 'OK'; 
     105    } 
     106} else { 
     107    echo 'Could not test (fix DB first).'; 
     108} 
     109echo '<br />'; 
     110 
    90111echo '<h3>Checking .ini settings</h3>'; 
    91112 
     
    93114$file_uploads = ini_get('file_uploads'); 
    94115 
    95 echo "session.auto_start: "; 
     116echo '<h4>session.auto_start</h4>'; 
     117echo 'status: '; 
    96118if ($auto_start == 1) { 
    97119    echo 'NOT OK'; 
     
    101123echo '<br />'; 
    102124 
    103 echo "file_uploads: "; 
     125echo '<h4>file_uploads</h4>'; 
     126echo 'status: '; 
    104127if ($file_uploads == 1) { 
    105128    echo 'OK'; 
     
    107130    echo 'NOT OK'; 
    108131} 
     132 
     133/* 
     134 * Probably not needed because we have a custom handler 
     135echo '<h4>session.save_path</h4>'; 
     136echo 'status: '; 
     137$save_path = ini_get('session.save_path'); 
     138if (empty($save_path)) { 
     139    echo 'NOT OK'; 
     140} else { 
     141    echo "OK: $save_path"; 
     142    if (!file_exists($save_path)) { 
     143        echo ', but it does not exist'; 
     144    } else { 
     145        if (!is_readable($save_path) || !is_writable($save_path)) { 
     146            echo ', but permissions to read and/or write are missing'; 
     147        } 
     148    } 
     149} 
    109150echo '<br />'; 
     151 */ 
    110152?> 
Note: See TracChangeset for help on using the changeset viewer.