Search Postgresql Archives

Re: php can't connect to postgresql server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2006/7/3, Robert Treat <xzilla@xxxxxxxxxxxxxxxxxxxxx>:
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 &quot;127.0.0.1&quot; 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux