Re: problem connecting to postgres via apache - Mailing list pgsql-general

From Tom Lane
Subject Re: problem connecting to postgres via apache
Date
Msg-id 13788.1390580904@sss.pgh.pa.us
Whole thread Raw
In response to Re: problem connecting to postgres via apache  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
Responses Re: problem connecting to postgres via apache  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
List pgsql-general
Susan Cassidy <susan.cassidy@decisionsciencescorp.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


pgsql-general by date:

Previous
From: Susan Cassidy
Date:
Subject: Re: problem connecting to postgres via apache
Next
From: Susan Cassidy
Date:
Subject: Re: problem connecting to postgres via apache