Re: problem connecting to postgres via apache

From: Bret Stern <bret_stern(at)machinemanagement(dot)com>
To: Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problem connecting to postgres via apache
Date: 2014-01-24 20:19:24
Message-ID: 1390594764.2479.9.camel@developer.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SELINUX is a bunch of settings to control security.

If you are able to find it, I was suggesting you disable it
only to see if the Apache problem goes away.

Then to turn it back on.

If it stops working, then there is a setting which is preventing
Apache from being accessed. Locating the specific setting
would be the next step.

On Fri, 2014-01-24 at 11:55 -0800, Susan Cassidy wrote:
> I don't actually know what SELinux is. What else will happen if I
> (find out how to) disable it?
>
>
> Susan
>
>
>
> On Fri, Jan 24, 2014 at 9:47 AM, Bret Stern
> <bret_stern(at)machinemanagement(dot)com> wrote:
> Are you calling the perl from apache (assuming yes)..? Does
> the web
> user have the rights to execute the perl code?
>
> Try disabling SELinux..
> You'll get it..
>
> On Fri, 2014-01-24 at 09:35 -0800, Susan Cassidy wrote:
> > I've already checked that. It is enabled. I am running
> Scientific
> > Linux.
> >
> >
> >
> > On Fri, Jan 24, 2014 at 8:28 AM, Tom Lane
> <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Susan Cassidy
> <susan(dot)cassidy(at)decisionsciencescorp(dot)com> writes:
> > > $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=
> > ${dbserver};port=$dbport;",
> > > $dbuser, $dbpasswd) or
> > > errexit( "Unable to connect to dbname $dbname,
> err:
> > $DBI::errstr");
> >
> > > The exact same connection string works fine in a
> standalone
> > perl program.
> >
> > Given the permissions errors you mentioned upthread,
> I'm
> > wondering whether
> > you're running on Red Hat/CentOS, and if so whether
> SELinux is
> > preventing
> > apache from connecting to unexpected port numbers.
> I seem to
> > recall
> > that there's a SELinux boolean specifically intended
> to allow
> > or disallow
> > database connections from webservers, but I couldn't
> tell you
> > the name
> > offhand.
> >
> > regards, tom lane
> >
> >
>
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2014-01-24 20:22:56 Re: problem connecting to postgres via apache
Previous Message Kevin Grittner 2014-01-24 20:17:03 Re: pg_dump: dumpBlobs(): could not open large object: ERROR: large object 27729547 does not exist