I installed postgres and i seem to have a problem connecting to it both locally and remotely.
this is the error i get:
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: missing or erroneous pg_hba.conf file HINT: See server log for details. in /var/www/html/2.3/includes/configuration.php on line 25
these are the contents of my pg_hba.conf file
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
#local all all ident sameuser
local all all trust all
[email protected]@local all all @authmethod@
#host all all 10.0.0.1 255.255.255.0 trust
host all all all trust all
# IPv4 local connections:
#host all all 127.0.0.1/32 ident sameuser
host all all 127.0.0.1/32 trust all
# IPv6 local connections:
host all all ::1/128 ident sameuser
i'd imagine "host all all all trust all" would allow anyone to access it, wouldn't it?
It seems that PostgreSQL is not even able to read your pg_hba.conf and/or parse it. The first things that come to mind are incorrect permissions, an incorrect path, or a syntax error in your config file. Did you check the logs for any more information?