Author Topic: Cant connect to a postgres database  (Read 5714 times)

Offline rjel

  • Newbie
  • *
  • Posts: 8
Cant connect to a postgres database
« on: October 18, 2007, 01:47:53 PM »
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

Offline till

  • Jr. Member
  • **
  • Posts: 49
Re: Cant connect to a postgres database
« Reply #1 on: October 18, 2007, 08:59:40 PM »
Check your phpinfo() if PHP has postgres support.

Offline rjel

  • Newbie
  • *
  • Posts: 8
Re: Cant connect to a postgres database
« Reply #2 on: October 19, 2007, 03:10:11 AM »
Yes

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

Any other idea?

/Jonas

Offline hcl

  • Jr. Member
  • **
  • Posts: 14
Re: Cant connect to a postgres database
« Reply #3 on: October 19, 2007, 04:52:40 AM »
Hi rjel,

Quote
The 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

Offline rjel

  • Newbie
  • *
  • Posts: 8
Re: Cant connect to a postgres database
« Reply #4 on: October 19, 2007, 05:50:44 AM »
Done that, any more sugestions.

/Jonas