[imp] Can't connect to PostgreSQL

Eric Rostetter eric.rostetter@physics.utexas.edu
Fri Nov 8 23:26:04 2002


Quoting David Tice <dtice@wheatonma.edu>:

> Can anyone Please help""

Yes!

> Warning:  Unable to connect to PostgreSQL server:  could not connect to
> server: Connection refused
>          Is the server running on host localhost and accepting
>          TCP/IP connections on port 5432?

That says it all...  99.9% chance you setup your postgresql to listen on
unix sockets,  but not on tcp/ip.

Fix 1: Configure horde to use unix sockets instead of tcp/ip.  Basically add:

   'protocol' => 'unix',

instead of

    'protocol' => 'tcp',

where ever it occurs.  (For me, that was the config/conf.php files for 
horde, kronolith, mnemo, nag, whups, and the sources.php file for turba).
This will only work if your postgresql database is on the same machine
as your httpd/horde install.

Fix 2: Configure postsgresql to list on tcp/ip.  Basically edit your 
postgresql postmaster.opts file to change:

/usr/bin/postmaster

to 

/usr/bin/postmaster -i

(In otherwords, add -i to the postmaster.opts).  This has security implications
and also performance issues...  So I recommend Fix 1 if your postgres is on
the same machine as your horde/imp/httpd.

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!


More information about the imp mailing list