You are hereRunning Drupal & Roundcube on the same MySQL database

Running Drupal & Roundcube on the same MySQL database


If you have tried to run Drupal (or any other PHP app) & Roundcube on the same MySQL database you may have run in to some problems. I certainly did. Roundcube appears to configure fine but when you go to log in you receive a 'Service Unavailable error'. This is because Roundcube cannot create the tables required as they already exist. You can get around this problem by adding a prefix to the start of the Roundcube tables in the mysql-initial.sql file and then running the .sql file in PHPMyAdmin to add the required tables.

This is how I edited my mysql.initial.sql file to add tables with prefixes.

CREATE TABLE `roundcube_session` (
CREATE TABLE `roundcube_users` (
CREATE TABLE `roundcube_messages` (
CREATE TABLE `roundcube_cache` (
CREATE TABLE `roundcube_contacts` (
CREATE TABLE `roundcube_identities` (

You can then open your database in PHPMyAdmin and import the file. This should successfully add these new tables into your shared database. You now need to tell Roundcube what the new tables are called by editing the db.inc.php config file you have already created during the installation. Mine now looks like this.

$rcmail_config['db_table_users'] = 'roundcube_users';
$rcmail_config['db_table_identities'] = 'roundcube_identities';
$rcmail_config['db_table_contacts'] = 'roundcube_contacts';
$rcmail_config['db_table_session'] = 'roundcube_session';
$rcmail_config['db_table_cache'] = 'roundcube_cache';
$rcmail_config['db_table_messages'] = 'roundcube_messages';

You should now be able to log in to Roundcube with no problems!

Search

Advertising