Click here to get back home

Apache::DBI + mod_perl 2.0.1. Please, help! Cannot get it work!

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Apache::DBI + mod_perl 2.0.1. Please, help! Cannot get it work! Grigory 11-02-2005
Posted by Grigory on November 2, 2005, 7:58 am
Please log in for more thread options


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");


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");
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.



Similar ThreadsPosted
modperl and apache handlers December 28, 2004, 5:38 am
can apache::filter work with virtual location? July 28, 2007, 10:36 pm
CGI.pm and ModPerl::Registry December 21, 2007, 11:20 pm
CPAN conflict issue - CGI.pm vs ModPerl::Registry September 25, 2006, 12:42 pm
starting apache with mod_perl, error on Apache.pm July 21, 2004, 5:34 pm
win32::api doesn't work? January 18, 2005, 11:47 pm
NET:LDAP start_tls does not work July 7, 2004, 12:19 pm
Compress::Bzip2 needs work April 20, 2005, 9:41 pm
Custom PM Modules Won't Work May 2, 2006, 7:17 pm
mod_perl2 won't work w/ActivestateP588 V.822 August 7, 2007, 5:35 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap