| | |
| | | } |
| | | echo '<br />'; |
| | | |
| | | if ($read_db && !empty($RCI->config['db_table_users'])) { |
| | | if ($read_db && !empty($RCI->config['db_dsnw'])) { |
| | | $RCI->pass('db.inc.php'); |
| | | } |
| | | else if ($read_db) { |
| | |
| | | |
| | | // test database |
| | | if ($db_working) { |
| | | $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_table_users']}"); |
| | | $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_prefix']}users"); |
| | | if ($DB->is_error()) { |
| | | $RCI->fail('DB Schema', "Database not initialized"); |
| | | echo '<p><input type="submit" name="initdb" value="Initialize database" /></p>'; |
| | |
| | | if ($db_working) { |
| | | // write test |
| | | $insert_id = md5(uniqid()); |
| | | $db_write = $DB->query("INSERT INTO {$RCI->config['db_table_session']} (sess_id, created, ip, vars) VALUES (?, ".$DB->now().", '127.0.0.1', 'foo')", $insert_id); |
| | | $db_write = $DB->query("INSERT INTO {$RCI->config['db_prefix']}session (sess_id, created, ip, vars) VALUES (?, ".$DB->now().", '127.0.0.1', 'foo')", $insert_id); |
| | | |
| | | if ($db_write) { |
| | | $RCI->pass('DB Write'); |
| | | $DB->query("DELETE FROM {$RCI->config['db_table_session']} WHERE sess_id=?", $insert_id); |
| | | $DB->query("DELETE FROM {$RCI->config['db_prefix']}session WHERE sess_id=?", $insert_id); |
| | | } |
| | | else { |
| | | $RCI->fail('DB Write', $RCI->get_error()); |
| | |
| | | |
| | | ?> |
| | | |
| | | <h3>Test filetype detection</h3> |
| | | |
| | | <p> |
| | | <?php |
| | | |
| | | if ($errors = $RCI->check_mime_detection()) { |
| | | $RCI->fail('Fileinfo/mime_content_type configuration'); |
| | | if (!empty($RCI->config['mime_magic'])) { |
| | | echo '<p class="hint">Try setting the <tt>mime_magic</tt> config option to <tt>null</tt>.</p>'; |
| | | } |
| | | else { |
| | | echo '<p class="hint">Check the <a href="http://www.php.net/manual/en/function.finfo-open.php">Fileinfo functions</a> of your PHP installation.<br/>'; |
| | | echo 'The path to the magic.mime file can be set using the <tt>mime_magic</tt> config option in Roundcube.</p>'; |
| | | } |
| | | } |
| | | else { |
| | | $RCI->pass('Fileinfo/mime_content_type configuration'); |
| | | } |
| | | |
| | | ?> |
| | | </p> |
| | | <p> |
| | | <?php |
| | | |
| | | if ($errors = $RCI->check_mime_extensions()) { |
| | | $RCI->fail('Mimetype to file extension mapping'); |
| | | echo '<p class="hint">Please set a valid path to your webserver\'s mime.types file to the <tt>mime_types</tt> config option.<br/>'; |
| | | echo 'If you can\'t find such a file, download it from <a href="http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types">svn.apache.org</a>.</p>'; |
| | | } |
| | | else { |
| | | $RCI->pass('Mimetype to file extension mapping'); |
| | | } |
| | | |
| | | ?> |
| | | |
| | | |
| | | <h3>Test SMTP config</h3> |
| | | |
| | | <p> |