perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: strange permission errors
Date Tue, 11 Mar 2008 05:55:59 GMT
Mag Gam wrote:
> Hi Gurus:
> 
> Moving my application from development to production server. For some 
> reason, I can't seem to execute my application when using mod_perl in 
> production. I keep getting this permission error:
> [Mon Mar 10 13:47:33 2008] [error] Can't call method "prepare" on an 
> undefined value at /var/www/:app/index.pl line 26.\n
> DBI connect('testdb','dbusr',...) failed: Couldn't connect to 
> /tmp/.s.PGSQL.5432: connect: Permission denied at 
> /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
>  at /var/www/app/index.pl line 24
> [Mon Mar 10 18:49:19 2008] [error] Can't call method "prepare" on an 
> undefined value at /var/www/app/index.pl line 26.\n
> DBI connect('testdb','dbusr',...) failed: Couldn't connect to 
> /tmp/.s.PGSQL.5432: connect: Permission denied at 
> /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
>  at /var/www/app/index.pl line 24
> [Mon Mar 10 20:05:36 2008] [error] Can't call method "prepare" on an 
> undefined value at /var/www/app/index.pl line 26.\n

httpd runs as a non-root user, usually 'httpd' or 'apache'.

Can that user access the PosgreSQL named pipe: /tmp/.s.PGSQL.5432

$> su apache -c '/bin/ls /tmp/.s.PGSQL.5432'

Should give you an idea what's up.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Mime
View raw message