Skip site navigation (1) Skip section navigation (2)

Re: PHP cann't access to postgres databse

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <donghe(at)caltech(dot)edu>,"Andy Shellam" <andy-lists(at)networkmail(dot)eu>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PHP cann't access to postgres databse
Date: 2009-06-26 17:07:11
Message-ID: 4A44B9EF0200002500027FAB@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-admin
Andy Shellam <andy-lists(at)networkmail(dot)eu> wrote: 
 
> donghe(at)caltech(dot)edu wrote:
>> Unable to connect to PostgreSQL server:
>> could not connect to server: Permission denied
>>   Is the server running on host "localhost" and accepting
>>   TCP/IP connections on port 5432? "
 
> Because the error is "Permission denied", I'm guessing it's
> permissions on the /tmp/.s.PGSQL.5432 socket that will need
> checking?
 
If it was trying to get that sort of connection, rather than TCP/IP,
the message would be different.  Something like:
 
# could not connect to server: No such file or directory
#   Is the server running locally and accepting
#   connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
 
You do have a point on the "Permission denied", though.  If the
problem was where I was suggesting, it would probably say "Connection
refused".  Perhaps some OS security restriction is in play here.
 
-Kevin

In response to

Responses

pgsql-admin by date

Next:From: dongheDate: 2009-06-26 17:24:23
Subject: Re: PHP cann't access to postgres databse
Previous:From: Andy ShellamDate: 2009-06-26 16:54:40
Subject: Re: PHP cann't access to postgres databse

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group