Search Postgresql Archives

Re: problem connecting to postgres via apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> wrote:
>         Susan Cassidy <susan.cassidy@xxxxxxxxxxxxxxxxxxxxxxxx> 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
> 
> 




-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux