perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grigory Ptashko <mannextdoor_y...@yahoo.com>
Subject Apache::DBI + mod_perl 2.0.1. Please, help! Cannot get it work!
Date Wed, 02 Nov 2005 17:32:42 GMT
Hello, everybody.

I have: 

FreeBSD 4.7 
Apache 2.0.54 
mod_perl 2.0.1 
Apache::DBI 0.99 (taken from http://p6m7g8.net/Apache-DBI) 

In my startup.pl I have: 

use Apache::DBI (); 
$Apache::DBI::DEBUG = 2; 
Apache::DBI->connect_on_init("DBI:Pg:dbname=test", "test", "test", 
{AutoCommit => 0, RaiseError => 1, PrintError => 0}); 

After startup, I see the following in error_log: 
20297 Apache::DBI             PerlChildInitHandler 
20298 Apache::DBI             PerlChildInitHandler 
20299 Apache::DBI             PerlChildInitHandler 
20300 Apache::DBI             PerlChildInitHandler 
20301 Apache::DBI             PerlChildInitHandler 
20308 Apache::DBI             PerlChildInitHandler 

But! 

When I run a simple registry script (it gives me the SELECT result, 
the script itself is alright): 

>8------------------------------- 

#!/usr/bin/perl 
use DBI; 
print "Content-type: text/plaIn\n\n"; 
print "mod_perl 2.0 rocks!\n"; 
my $dbh = DBI->connect("DBI:Pg:dbname=test", "test", "test", 
{AutoCommit => 0, RaiseError => 1, PrintError => 0}); 
my $sth = $dbh->prepare("SELECT id FROM test"); 
$sth->execute(); 
while (my ($id) = $sth->fetchrow_array()) 
{ 
      print $id . "\n"; 

} 
$sth->finish(); 
>8-------------------------------- 

I don't see ANYTHING in my error_log file EXCEPT: 

>8-------------- 

Issuing rollback() for database handle being DESTROY'd without explicit 
disconnect() at 
/usr/local/lib/perl5/site_perl/5.8.7/i386-freebsd/ModPerl/RegistryCooker.pm 
line 203. 

>8-------------- 

What does this mean? For it means that Apache::DBI is not used at all! 
Am I wrong? I'm stuck. 
How to get it work?? 

Thank you. 

		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  
Mime
View raw message