On Thu, 26 May 2011 18:45:19 -0400 (EDT) "Max Pyziur" pyz@brama.com wrote:
I changed some settings in /pathtopgsql/data/pg_hba.conf
I'd go with a:
local yourdbname yourusername md5
hostssl yourdbname yourusername 0.0.0.0 0.0.0.0 md5
Beware that when the connection string contains host=localhost php drivers may try to connect through tcp/ip not unix sockets and the first login method won't work. This required some tweaking of core in D5/D6. I'm not sure if this problem has been solved in D7.
The second entry is for remote encrypted connection over tcp/ip. If you want an encrypted connection you'll have to do some extra work to set up certificates. DON'T use unencrypted connection over public/semi public connection, no matter if you restrict the range of accepted IP.
If you can't succede to use unix sockets you can use tcp/ip on localhost at some performance cost.
#ipv4 host yourdbname yourusername 127.0.0.1/32 md5 #ipv6 host yourdbname yourusername ::1/128 md5