Re: php can't connect to postgresql server - Mailing list pgsql-general

From Clodoaldo Pinto
Subject Re: php can't connect to postgresql server
Date
Msg-id a595de7a0607030729s65d9c6a0gf340b197f3934e43@mail.gmail.com
Whole thread Raw
In response to Re: php can't connect to postgresql server  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-general
2006/7/3, Robert Treat <xzilla@users.sourceforge.net>:
> On Monday 03 July 2006 09:25, Clodoaldo Pinto wrote:
> > php can't connect to postgresql server
> >
> > php error log message:
> >
> > PHP Warning:  pg_connect() [<a
> > href='function.pg-connect'>function.pg-connect</a>]: Unable to connect
> > to PostgreSQL server: could not connect to server: Permission
> > denied\n\tIs the server running on host "127.0.0.1" and
> > accepting\n\tTCP/IP connections on port 5432?
> >
> > php connection string:
> >
> > $conn_string = "hostaddr=127.0.0.1 port=5432 dbname=dbname
> > user=username password=password";
> >
> > Also tried host=localhost
> >
>
> It needs to be host, not hostaddr.

Changed to host=localhost as I had already done before with the same
results. From the php manual:

"The currently recognized parameter keywords are: host, hostaddr,..."

> > What else should I check? I am out of ideas.
> >
>
> Make sure that your postgresql.conf  "listen_addresses" is properly set,

What do you mean by properly set? What I had already post is not properly set?:

listen_addresses = '127.0.0.1,xx.xx.xxx.xx'

> make sure you dont have a firewall setting that is blocking connections, the
> default firewall settings on FC boxes are notorious for blocking pg.

Opened the 5432 port in the firewall and still the same problem.

Clodoaldo

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: How serious are these problems?
Next
From: Tom Lane
Date:
Subject: Re: [JDBC] Is what I want possible and if so how?