Roundcube Community Forum

 

MySQL and or Pear issue

Started by krazygoat, May 01, 2008, 07:21:18 PM

Previous topic - Next topic

krazygoat

DB Error: no RDBMS driver specified in /var/www/vhosts/hostname/subdomains/mail/httpdocs/program/include/rcube_mdb2.inc on line 110

Anyone run into this? Is this an issue with Pear?

bpat1434

What release (or SVN revision) are you using?

Sounds like you didn't specify a database type in the DSN string proplery:
[noparse]
mysql://username:password@host/database
pgsql://username:password@host/database
sqlite://username:password@host/database
[/noparse]
Those are your three options.
 
 

krazygoat

#2
I am using 0.1.1

I specified the correct database, username, and password in the db.inc.php file.

I put a test.php in the root httpdocs directory to test the connection to the roundcubemail database and it tests OK.

It is running under mysql

so I have mysql://user_I_created:password_for_user@localhost/roundcubemail

bpat1434

Can you post your exact db.inc.php here?  Obviously start out (****) the username and passwords.
 
 

krazygoat

#4
Here is my db.inc.php file with the username and password obviously replaced. I have also tried it with localhost set to the IP address of the server and get the same error.


<?php

/*
 +-----------------------------------------------------------------------+
 | Configuration file for database access                                |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

*/

$rcmail_config = array();

// PEAR database DSN for read/write operations
// format is db_provider://user:password@host/database 
// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql

$rcmail_config['db_dsnw'] = 'mysql://username:password@localhost/roundcubemail';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
// sqlite example: 'sqlite://./sqlite.db?mode=0646';

// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['db_dsnr'] = '';

// database backend to use (only db or mdb2 are supported)
$rcmail_config['db_backend'] = 'mdb2';

// maximum length of a query in bytes
$rcmail_config['db_max_length'] = 512000;  // 500K

// use persistent db-connections
// beware this will not "always" work as expected
// see: [url]http://www.php.net/manual/en/features.persistent-connections.php[/url]
$rcmail_config['db_persistent'] = FALSE;


// you can define specific table names used to store webmail data
$rcmail_config['db_table_users'] = 'users';

$rcmail_config['db_table_identities'] = 'identities';

$rcmail_config['db_table_contacts'] = 'contacts';

$rcmail_config['db_table_session'] = 'session';

$rcmail_config['db_table_cache'] = 'cache';

$rcmail_config['db_table_messages'] = 'messages';


// you can define specific sequence names used in PostgreSQL
$rcmail_config['db_sequence_users'] = 'user_ids';

$rcmail_config['db_sequence_identities'] = 'identity_ids';

$rcmail_config['db_sequence_contacts'] = 'contact_ids';

$rcmail_config['db_sequence_cache'] = 'cache_ids';

$rcmail_config['db_sequence_messages'] = 'message_ids';


// end db config file
?>

krazygoat

Hmm, last time I submitted this didn't show up, sooo once again, here is the db.inc.php file with the username and password replaced. I also tried with localhost set to the IP address of the server.


/*
 +-----------------------------------------------------------------------+
 | Configuration file for database access                                |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

*/

$rcmail_config = array();

// PEAR database DSN for read/write operations
// format is db_provider://user:password@host/database
// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql

$rcmail_config['db_dsnw'] = 'mysql://****:****@localhost/roundcubemail';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
// sqlite example: 'sqlite://./sqlite.db?mode=0646';

// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['db_dsnr'] = '';

// database backend to use (only db or mdb2 are supported)
$rcmail_config['db_backend'] = 'mdb2';

// maximum length of a query in bytes
$rcmail_config['db_max_length'] = 512000;  // 500K

// use persistent db-connections
// beware this will not "always" work as expected
// see: http://www.php.net/manual/en/features.persistent-connections.php
$rcmail_config['db_persistent'] = FALSE;


// you can define specific table names used to store webmail data
$rcmail_config['db_table_users'] = 'users';

$rcmail_config['db_table_identities'] = 'identities';

$rcmail_config['db_table_contacts'] = 'contacts';

$rcmail_config['db_table_session'] = 'session';

$rcmail_config['db_table_cache'] = 'cache';

$rcmail_config['db_table_messages'] = 'messages';


// you can define specific sequence names used in PostgreSQL
$rcmail_config['db_sequence_users'] = 'user_ids';

$rcmail_config['db_sequence_identities'] = 'identity_ids';

$rcmail_config['db_sequence_contacts'] = 'contact_ids';

$rcmail_config['db_sequence_cache'] = 'cache_ids';

$rcmail_config['db_sequence_messages'] = 'message_ids';


// end db config file
?>

krazygoat

I also created this little database connection test file and it IS able to connect successfully




Mind you I an not a web developer, or database admin, nor do I typically do this kind of work, so it is probably something I am missing, but I have tried every suggestion I could find online and tried reinstalling it over and over again following every set of install directions I could find, and every time I end up with the same result. I am also using a virtual server hosted by Media Temple so maybe it is something unique to their setup, but the installer said I had everything needed to get Roundcube running.

bpat1434

I guess my next question is: Is there a database called "roundcubemail" that is accessible from the user you're connecting as?
 
 

krazygoat

The db.inc.php config file


/*
 +-----------------------------------------------------------------------+
 | Configuration file for database access                                |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

*/

$rcmail_config = array();

// PEAR database DSN for read/write operations
// format is db_provider://user:password@host/database
// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql

$rcmail_config['db_dsnw'] = 'mysql://****:****@localhost/roundcubemail';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
// sqlite example: 'sqlite://./sqlite.db?mode=0646';

// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['db_dsnr'] = '';

// database backend to use (only db or mdb2 are supported)
$rcmail_config['db_backend'] = 'mdb2';

// maximum length of a query in bytes
$rcmail_config['db_max_length'] = 512000;  // 500K

// use persistent db-connections
// beware this will not "always" work as expected
// see: http://www.php.net/manual/en/features.persistent-connections.php
$rcmail_config['db_persistent'] = FALSE;


// you can define specific table names used to store webmail data
$rcmail_config['db_table_users'] = 'users';

$rcmail_config['db_table_identities'] = 'identities';

$rcmail_config['db_table_contacts'] = 'contacts';

$rcmail_config['db_table_session'] = 'session';

$rcmail_config['db_table_cache'] = 'cache';

$rcmail_config['db_table_messages'] = 'messages';


// you can define specific sequence names used in PostgreSQL
$rcmail_config['db_sequence_users'] = 'user_ids';

$rcmail_config['db_sequence_identities'] = 'identity_ids';

$rcmail_config['db_sequence_contacts'] = 'contact_ids';

$rcmail_config['db_sequence_cache'] = 'cache_ids';

$rcmail_config['db_sequence_messages'] = 'message_ids';


// end db config file
?>

Hope that helps

krazygoat

Well my db.inc.php post keep getting blocked by moderation so I will just post the important part of it instead of the whole thing.

$rcmail_config = array();

// PEAR database DSN for read/write operations
// format is db_provider://user:password@host/database
// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql

$rcmail_config['db_dsnw'] = 'mysql://****:****@localhost/roundcubemail';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
// sqlite example: 'sqlite://./sqlite.db?mode=0646';

// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['db_dsnr'] = '';

// database backend to use (only db or mdb2 are supported)
$rcmail_config['db_backend'] = 'mdb2';

// maximum length of a query in bytes
$rcmail_config['db_max_length'] = 512000;  // 500K

// use persistent db-connections
// beware this will not "always" work as expected
// see: http://www.php.net/manual/en/features.persistent-connections.php
$rcmail_config['db_persistent'] = FALSE;

krazygoat

I have tried to post my db.inc.php file 4 times and keeps getting blocked by moderation so here is the important line. I have also tried with localhost replaced by the IP address with the same results.

$rcmail_config['db_dsnw'] = 'mysql://****:****@localhost/roundcubemail';

krazygoat

I can ssh onto the server and log into the roundcubemail database and do a show tables using the username and password I have set in the db.inc.php file

bpat1434

You HAVE posted your db.inc.php file 4 times... I deleted the second, and wrapped the first in [noparse][/noparse] tags.

There seem to be a lot of issues with mdb2 floating around here.  Not really sure where to go, I'm not an mdb2 user.
 
 

krazygoat

I found the solution when you pointed that out, I changed

$rcmail_config['db_backend'] = 'mdb2';

to

$rcmail_config['db_backend'] = 'db'; and now all is well, I get an actual login screen.

djm

I just downloaded and have been trying roundcube today.  Having a possibly related problem myself.

The "http://domain.com/roundcube/installer/index.php?_step=3" page for me is reporting the following errors depending on my "db" settings:

With $rcmail_config['db_backend'] = 'mdb2';
I get...
Backend: PEAR::MDB2
DSN (write):  NOT OK(MDB2 Error: not found)

With $rcmail_config['db'] = 'mdb2';
I get...
DSN (write):  NOT OK(not set)

With $rcmail_config['db_backend'] = 'db';
I get...
Backend: PEAR::DB
DSN (write):  OK
DB Schema:  OK
Warning: uniqid() expects at least 1 parameter, 0 given in /usr/local/nusphere/apache/htdocs/rcube/installer/test.php on line 123
DB Write:  OK
DB Time:  OK