* @license http://www.opensource.org/licenses/bsd-license.php The BSD License * @version CVS: $Id$ * @link https://svn.roundcube.net/trunk * @todo Check IMAP settings. * @todo Check SMTP settings. * @todo HTML/CSS to make it pretty. * @todo In devel-next, use bootstrap. */ $include_path = dirname(__FILE__) . '/program/lib/'; $include_path .= PATH_SEPARATOR; $include_path .= dirname(__FILE__) . '/program/'; $include_path .= PATH_SEPARATOR; $include_path .= get_include_path(); set_include_path($include_path); $writable_dirs = array('logs/', 'temp/'); $create_files = array('config/db.inc.php', 'config/main.inc.php'); $path = dirname(__FILE__) . '/'; echo '

Check if directories are writable

'; echo '

RoundCube may need to write/save files into these directories.

'; foreach ($writable_dirs AS $dir) { echo "Directory $dir: "; if (!is_writable($path . $dir)) { echo 'NOT OK'; } else { echo 'OK'; } echo "
"; } echo '

Check if you setup config files

'; echo '

Checks if the files exist and if they are readable.

'; foreach ($create_files AS $file) { echo "File $file: "; if (file_exists($path . $file) && is_readable($path . $file)) { echo 'OK'; } else { echo 'NOT OK'; } echo '
'; } 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'; $db = MDB2::connect($rcmail_config['db_dsnw']); if (!MDB2::IsError($db)) { echo 'OK'; $db->disconnect(); $db_working = true; } else { echo 'NOT OK'; } echo '
'; } else { 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 'status: '; if ($auto_start == 1) { echo 'NOT OK'; } else { echo 'OK'; } echo '
'; 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 '
'; */ ?>