[ccosta at gmail.com: Re: [PHP] Problems connecting (from php to pg)]

Paul Howarth paul at city-fan.org
Mon Jun 9 22:09:52 UTC 2008


On Mon, 9 Jun 2008 17:30:55 -0400
Jeff MacDonald <jam at zoidtechnologies.com> wrote:

> Greetings,
> 
> I felt this would be of interest to the selinux list, so I am
> forwarding it along.
> 
> Regards,
> jam
> 
> ----- Forwarded message from Carlos Costa <ccosta at gmail.com> -----
> 
> Date: Mon, 9 Jun 2008 22:50:15 +0200
> From: Carlos Costa <ccosta at gmail.com>
> To: Daniel Alejandro <dcarreroc at gmail.com>
> Cc: pgsql-php at postgresql.org
> Subject: Re: [PHP] Problems connecting (from php to pg)
> 
> Thank you, Daniel and all. My problem was not related to pg, but to
> selinux. I disabled selinux, and all runs fine now.
> 
> On Mon, Jun 9, 2008 at 10:17 PM, Daniel Alejandro
> <dcarreroc at gmail.com> wrote:
> > 2008/6/7 Carlos Costa <ccosta at gmail.com>:
> >> Hello all,
> >>
> >> I've the "standard connection error":
> >>
> >> 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?
> >>
> >> The system is, yes, running and -I think- accepting TCP/IP
> >> connections (I've tested this with netstat, I can connect to it
> >> with psql -h localhost, and so).

I suspect that:

# setsebool httpd_can_network_connect_db=1

might have been enough to fix this. Sigh.

Paul.




More information about the fedora-selinux-list mailing list