| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com> |
| Cc: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: problem connecting to postgres via apache |
| Date: | 2014-01-24 16:28:24 |
| Message-ID: | 13788.1390580904@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Susan Cassidy | 2014-01-24 17:35:43 | Re: problem connecting to postgres via apache |
| Previous Message | Susan Cassidy | 2014-01-24 16:13:19 | Re: problem connecting to postgres via apache |