Author Topic: MySQL and or Pear issue  (Read 10122 times)

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« on: May 01, 2008, 07:21:18 PM »
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?

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
MySQL and or Pear issue
« Reply #1 on: May 01, 2008, 08:43:33 PM »
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.
 
  

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #2 on: May 06, 2008, 09:50:03 PM »
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
« Last Edit: May 06, 2008, 09:55:26 PM by krazygoat »

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
MySQL and or Pear issue
« Reply #3 on: May 07, 2008, 08:41:13 AM »
Can you post your exact db.inc.php here?  Obviously start out (****) the username and passwords.
 
  

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #4 on: May 08, 2008, 12:21:37 PM »
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
?>
« Last Edit: May 08, 2008, 02:36:53 PM by bpat1434 »

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #5 on: May 08, 2008, 12:54:44 PM »
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
?>

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #6 on: May 08, 2008, 12:59:36 PM »
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.

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
MySQL and or Pear issue
« Reply #7 on: May 08, 2008, 02:37:38 PM »
I guess my next question is: Is there a database called "roundcubemail" that is accessible from the user you're connecting as?
 
  

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #8 on: May 09, 2008, 02:45:24 PM »
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

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #9 on: May 09, 2008, 02:47:44 PM »
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;

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #10 on: May 09, 2008, 02:50:00 PM »
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';

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #11 on: May 09, 2008, 03:13:31 PM »
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

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
MySQL and or Pear issue
« Reply #12 on: May 09, 2008, 03:57:56 PM »
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.
 
  

Offline krazygoat

  • Newbie
  • *
  • Posts: 9
MySQL and or Pear issue
« Reply #13 on: May 09, 2008, 04:58:09 PM »
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.

Offline djm

  • Newbie
  • *
  • Posts: 4
db issues here too
« Reply #14 on: May 30, 2008, 06:46:37 PM »
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