I just installed Webmin on my dedicated server and I really had hard time making all configuration that were needed to migrate my site. Anyway, now everything is working except for one thing. I can’t connect to the database through PHP. Remote connection is working fine, but local doesn’t.
The connection string looks like this:
pg_connect('host=localhost user=user password=pass dbname=db')
I made the necessary changes in postgresql.conf
listen_addresses = '*'
port=5432
And I added this in pg_nba.conf:
local all all trust
local all user ident sameuser
local db user password
But still I cannot connect on localhost using php. The connection file is the same as it was on my previous host (shared one) so it’s supposed to be working.
I created the same database and user.
Any idea?
Thanks in advance!
P.S.
I know that this is mostly DB issue, and I already posted this same question on Postgre user group, but no answer