Author Topic: Unable to connect to the database  (Read 8461 times)

Offline alsvartr

  • Newbie
  • *
  • Posts: 3
Unable to connect to the database
« on: May 21, 2010, 10:49:47 AM »
Hi, I have a problem with roundcube 0.3.1 in Debian Lenny. Roundcube is giving me this error:

Quote
DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.


Log:
Quote
[21-May-2010 18:34:08] MDB2 Error: not found (-4): no RDBMS driver specified
[21-May-2010 18:34:08 +0400]: DB Error: no RDBMS driver specified in /usr/share/roundcube/program/include/rcube_mdb2.php on line 100 (GET /roundcube/)
[21-May-2010 18:34:11] MDB2 Error: not found (-4): no RDBMS driver specified
[21-May-2010 18:34:11 +0400]: DB Error: no RDBMS driver specified in /usr/share/roundcube/program/include/rcube_mdb2.php on line 100 (GET /roundcube/)


I double checked my db settings and permissions of roundcube config files. Any suggestions?

Roundcube: 0.3.1
PHP: 5.2.6
MySQL: 5.0.51a

Offline dziobak

  • Full Member
  • ***
  • Posts: 184
Unable to connect to the database
« Reply #1 on: May 21, 2010, 03:09:28 PM »
did you make database for RC?
did you edit db.inc.php and set login detail for RC database?

Offline alsvartr

  • Newbie
  • *
  • Posts: 3
Unable to connect to the database
« Reply #2 on: May 21, 2010, 05:54:19 PM »
Quote from: dziobak;27603
did you make database for RC?

Quote
mysql> SHOW TABLES FROM roundcubemail;
+-------------------------+
| Tables_in_roundcubemail |
+-------------------------+
| cache                   |
| contacts                |
| identities              |
| messages                |
| session                 |
| users                   |
+-------------------------+
6 rows in set (0.00 sec)


Quote from: dziobak;27603
did you edit db.inc.php and set login detail for RC database?

/etc/roundcube/db.inc.php:
Quote
$rcmail_config = array();

/* Do not set db_dsnw here, use dpkg-reconfigure roundcube to configure database ! */

include_once("/etc/roundcube/debian-db.php");
...
...


/etc/roundcube/debian-db.php:
Quote
dbuser='alsvartr'
dbpass='pass'
basepath=''
dbname='roundcubemail'
dbserver='localhost'
dbport=''
dbtype='mysql'

Offline alsvartr

  • Newbie
  • *
  • Posts: 3
Unable to connect to the database
« Reply #3 on: May 23, 2010, 08:48:55 AM »
It seems that include_once directive not working correctly in db.inc.php (or maybe this is my php issue). I set up login details directly in db.inc.php and it worked.