Ejemplo n.º 1
0
 /**
  * Object constructor
  *
  * @param object  Instance of the rcube_db class
  * @param integer User-ID
  */
 function __construct($dbconn, $user)
 {
     $this->db = $dbconn;
     $this->user_id = $user;
     $this->ready = $this->db && !$this->db->is_error();
 }
Ejemplo n.º 2
0
Archivo: test.php Proyecto: ehmedov/www
    if (!$pass) {
        echo '<p class="hint">Use <tt>chmod</tt> or <tt>chown</tt> to grant write privileges to the webserver</p>';
    }
} else {
    $RCI->fail('Config', 'Could not read config files');
}
?>

<h3>Check configured database settings</h3>
<?php 
$db_working = false;
if ($RCI->configured) {
    if (!empty($RCI->config['db_dsnw'])) {
        $DB = new rcube_mdb2($RCI->config['db_dsnw'], '', false);
        $DB->db_connect('w');
        if (!($db_error_msg = $DB->is_error())) {
            $RCI->pass('DSN (write)');
            echo '<br />';
            $db_working = true;
        } else {
            $RCI->fail('DSN (write)', $db_error_msg);
            echo '<p class="hint">Make sure that the configured database exists and that the user has write privileges<br />';
            echo 'DSN: ' . $RCI->config['db_dsnw'] . '</p>';
        }
    } else {
        $RCI->fail('DSN (write)', 'not set');
    }
} else {
    $RCI->fail('Config', 'Could not read config files');
}
// initialize db with schema found in /SQL/*