Search Postgresql Archives

Re: php can't connect to postgresql server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



am  03.07.2006, um 10:25:29 -0300 mailte Clodoaldo Pinto folgendes:
> $conn_string = "hostaddr=127.0.0.1 port=5432 dbname=dbname
                           ^^^^^^^^^

> I can connect as that user with psql:
> 
> $ psql -h localhost -U username dbname
            ^^^^^^^^^

Try 'localhost' instead '127.0.0.1' in your $conn_string.

My guess: pg don't listen on tcp/ip, only on the local socket.
(check listen_addresses in your postgresql.conf)


HTH, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    === 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux