Re: php pg_connect fails, pgsql works

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To:
Cc: John Cartwright <John(dot)C(dot)Cartwright(at)noaa(dot)gov>, pgsql-general(at)postgresql(dot)org
Subject: Re: php pg_connect fails, pgsql works
Date: 2008-03-10 21:58:59
Message-ID: Pine.GSO.4.64.0803101755450.24133@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 10 Mar 2008, Tom Lane wrote:

> I don't know much about how to fix it, other than the extremely
> brute-force tool of "setenforce 0". On current Fedora it looks like the
> way is probably "setsebool -P allow_user_postgresql_connect 1", but I'm
> not sure if RHEL5 uses that approach or something older.

I was able to work around a similar issue using Robert's article at
http://people.planetpostgresql.org/xzilla/index.php?/archives/310-typically-I-recommend-you-disable-SELinux....html
where he suggests that "setsebool -P httpd_can_network_connect_db=1" is
the magic incantation for RHEL5. That fixed my problem using PHP there.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mgainty 2008-03-10 22:40:49 Re: ISO something like "#if 0 ... #endif" for SQL code
Previous Message John Cartwright 2008-03-10 21:13:29 Re: php pg_connect fails, pgsql works