Roundcube Community Forum

 

Cant connect to a postgres database

Started by rjel, October 18, 2007, 01:47:53 PM

Previous topic - Next topic

rjel

Hello!

I Have a Debian machine that I'm trying to configure roundcube to work on using Postgres (7.4) as database.

I get the famous (?)

DATABASE ERROR: CONNECTION FAILED!

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

In my browser
In the apache error log the following is printed:
[Thu Oct 18 18:50:28 2007] [error] [client 217.208.191.12] PHP Notice: DB Error: extension not found in /usr/local/roundcubemail-0.1-rc1/program/include/bugs.inc on line 80

The connection string in db.inc.php file looks like this
$rcmail_config['db_dsnw'] = 'pgsql://roundcube:mypassword@localhost/roundcube';

I think I have set up postgres ok
I have turned on tcp/ip sockets (I can for example do >telnet localhost 5432 and get a promt)
added user roundcube and created database (>psql -d roundcube -U roundcube works and password is accepted )

What have I missed?

Thanks a lot in advance.

/Jonas

till

Check your phpinfo() if PHP has postgres support.

rjel

Yes

supported databases    MySQL ODBC PostgreSQL Microsoft SQL Server FrontBase Oracle 8 (oci8) Sybase-CT

Any other idea?

/Jonas

hcl

Hi rjel,

QuoteThe connection string in db.inc.php file looks like this
$rcmail_config['db_dsnw'] = 'pgsql://roundcube:mypassword@localhost/roundcube';

You must set privilleges user 'roundcube' and setup the appropriate permissions on this database 'roundcube'
after there, 'flush privilleges'.

I'm use RoundCube with:
Linux 2.6.18-8.el5 (Centos 5)
QMAIL 1.03
MySQL 14.12 Distrib 5.0.22
Courier-IMAP-4.0.2
Apache/2.2.3
Clamav 0.91.2 with SIMCAN 1.3.1

rjel