"John Coulthard" <bahhab@hotmail.com> writes:
> That's not my problem though this is "could not connect to server:
> Permission denied" If it's denying permission I must have the permissions
> set wrong but where to I start looking for them?
"Permission denied" is a pretty strange error for a TCP connect failure,
as that is not a filesystem operation.
Are you able to connect with psql, or some other non-php client?
Use "psql -h localhost" to make sure it tries a TCP connection not
a Unix-socket connection.
regards, tom lane