$DBI::errstr == (no error string)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm going quickly insane trying to debug this...

Long story short:
DBI 1.50
DBD::Pg 1.43
Perl 5.8.5
mod_perl 2.0.2
Class::DBI 3.0.1
Apache::DBI 0.9901

Basic problem is that I can't connect to my PG database from inside Apache from my Linux box (running Apache 2.0.52/prefork) but I can from my OS X box (Apache 2.2.0/prefork). Using the same DBI abstraction layer and options (user, password, etc), I can connect from standalone perl scripts on both boxes just fine. The relevant parts of the trace from the failed connection attempt is:

DBI connect('database=******;host=******;port=5432','muuser',...) failed: (no error string) at /var/www/html/mulder/lib/Mu/DBI.pm line 63


Trace begun at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/ Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('DBI connect (\'database=*****;host=******;port=5432\',\'muuser\',...) failed: (no error string) at /var/www/html/mulder/lib/Mu/DBI.pm line 63^J') called at /usr/lib/perl5/5.8.5/Carp.pm line 201
Carp::croak('DBI connect(\'database=*****;host=******;port=5432\', \'muuser\',...) failed: (no error string)') called at /usr/lib/perl5/ site_perl/5.8.5/i386-linux-thread-multi/DBI.pm line 629
DBI::__ANON__(undef, undef) called at /usr/lib/perl5/site_perl/5.8.5/ i386-linux-thread-multi/DBI.pm line 681
DBI::connect('DBI', 'dbi:Pg:database=*****;host=******;port=5432', 'muuser', '*****', 'HASH(0x97c4398)') called at /var/www/html/mulder/ lib/Mu/DBI.pm line 63
Mu::DBI::connect('Mu::DBI', 'singlepid', 1) called at /var/www/html/ mulder/www/syshandler line 8



Looking at pcap's and my PG log files (debug level 5) it seems that I connect and authenticate just fine, but then the connection just shuts down.


Other then upgrading my Apache to 2.2.0 (which seems a bit overkill and a PITA due to all the extra modules I'm using) how can I debug this to figure out why DBI is barfing?

The actual connect statement is:
 my %dbh;

$dbh{'singlepid'} = DBI->connect(Mu::DBI->dsn, Mu::Config->DBUSER,
Mu::Config->DBPASS, { PrintError => 1, RaiseError => 1, AutoCommit => 0,
FetchHashKeyName => 'NAME_lc', ShowErrorStatement => 1,
ChopBlanks => 1, Taint => 1, RootClass => 'DBIx::ConextualFetch'}) or
croak("Can't connect to DB: $DBI::errstr");


Thanks,
Aaron


-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDrE3DklVhPAXg8nARAjUKAJ9ZhUFr/gEHeGD0lEDE6UvSYbLsegCfYLg5
HC2zIxXRo36Kfg3C1EswMMY=
=NqpO
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Apache -Perl-DBD-Oracle Module Issue - Regd.
    ... We have upgraded the Apache with SSL enabled along with Perl and compiled with DBI and DBD-Oracle Modules.. ...
    (perl.dbi.users)
  • Re: DBI::ProfileDumper::Apache and mod_perl 2
    ... Apache 2 starts normally but no joy ... with getting any Profile data out. ... let DBI do that in a connect statement (or be sure to load it ... downloaded my own MySQL, DBI and DBD source packages, removed the ...
    (perl.dbi.users)
  • DBI on HP-UX 11.11 with Perl 5.8.3 and Apache (mod_perl 1.99)
    ... I am unsuccessfully trying to use DBI under mod_perl on HP-UX ... I have tried compiling different ways and reading ... The Apache installation is the standard "HPWS" (HP Web Server) ...
    (comp.sys.hp.hpux)
  • RE: Apache, DBI, Oracle
    ... Isn't server error a permissions problem? ... Subject: Apache, DBI, Oracle ... Does anyone have a step by step procedure for configuring apache, ...
    (perl.dbi.users)
  • RE: Apache, DBI, Oracle
    ... In your Apache error_log, it will give you the nature of the server error which will help you to troubleshoot whether it's a permissions problem, browser problem, or some other issue. ... This is not a DBI issue per se, so if you'd like to continue off-line, feel free to contact me directly. ...
    (perl.dbi.users)