perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enno <burg...@xs4all.nl>
Subject RE: Apache-DBI
Date Tue, 08 Nov 2005 16:16:32 GMT
hmmm, dont have any experience with mp1, so I'm guess MOD_PERL_API_VERSION
isnt set in it.

To fix, change

if ($ENV{MOD_PERL_API_VERSION} == 2) {

into

if (defined $ENV{MOD_PERL_API_VERSION} and $ENV{MOD_PERL_API_VERSION} == 2) {

hope this helps.

Enno


On Tue, 8 Nov 2005, Paul Harrison wrote:

> Here's the code form Apache::DBI
>
>
>
> Line 211 causing the warning: -->  if ($ENV{MOD_PERL_API_VERSION} == 2) {
>
>
> sub connect_on_init {
>     # provide a handler which creates all connections during server startup
>
>     if ($ENV{MOD_PERL_API_VERSION} == 2) {
>         if (!@ChildConnect) {
>             require Apache2::ServerUtil;
>             my $s = Apache2::ServerUtil->server;
>             $s->push_handlers(PerlChildInitHandler => \&childinit);
>         }
>     } else {
>         carp "Apache.pm was not loaded\n" and return unless
> $INC{'Apache.pm'};
>         if (!@ChildConnect and Apache->can('push_handlers')) {
>             Apache->push_handlers(PerlChildInitHandler => \&childinit);
>         }
>     }
>
>     # store connections
>     push @ChildConnect, [@_];
> }
>
>
>
> If the problem is harmless, than no biggie.
>
>
> Cure
>
> -----Original Message-----
> From: Christopher H. Laco [mailto:claco@chrislaco.com]
> Sent: Tuesday, November 08, 2005 9:51 AM
> To: Paul Harrison
> Cc: modperl@perl.apache.org
> Subject: Re: Apache-DBI
>
> Paul Harrison wrote:
> > p5-DBD-mysql50-3.0002
> >
> > p5-DBI-1.48
> >
> > p5-Apache-DBI-0.94_1
> >
> >
> >
> > I upgraded the database server from the "4" version to "5", so I updated
> the
> > Perl database Drivers -> DBD,DBI, and Apache-DBI.
> >
> >
> >
> > Once I updated the software, I get the following text in the Apache error
> > log -->
> >
> >
> >
> > [Tue Nov  8 10:41:04 2005] DBI.pm: Use of uninitialized value in numeric
> eq
> > (==) at /usr/local/lib/perl5/site_perl/5.6.1/Apache/DBI.pm line 211.
> >
> > [Tue Nov  8 10:41:04 2005] startup.perl: Use of uninitialized value in
> > numeric eq (==) at /usr/local/lib/perl5/site_perl/5.6.1/Apache/DBI.pm line
> > 35.
> >
> >
> >
> >
> >
> >
> >
> > Why does this happen?
>
>
> I imagine somewhere in the code, there's something resembling
>
> eval 'use Apache::BI 0.90';
>
> The error is because 0.094_01 can't be used in a numeric comparison like
> that. The message itself is harmless I believe and things should still work.
>
> I had the same problem last night in my test suite when doing:
>
> eval 'use Catalyst 5.00';
>
> when I had a dev version of Catalyst 5.5_03 installed.
>
> -=Chris
>
>
>


Mime
View raw message