You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Nathan Wiger <na...@west.sun.com> on 2000/06/29 22:50:53 UTC

Possible mod_perl or ??? bug?

Hi all-

On a totally different subject, I've been experiencing problems with the
interaction between CGI::Carp and Apache::Session. I find that in a
mod_perl context, if I import CGI::Carp before I import Apache::Session,
then I run into the following error:

[Thu Jun 29 13:14:03 2000] [error]  (in cleanup) Can't use an undefined
value as a symbol reference at
/apache/perl/lib/site_perl/5.005/Apache/Session/Lock/File.pm line 109.

This happens if I use "PerlModule" in httpd.conf or "use" in the script
to import them. If you reverse the order, importing Apache::Session
before CGI::Carp, then everything's ok! This also only happens under
mod_perl - under a normal CGI context it works just fine. Strange.

The code this is referencing is this:

   sub release_all_locks  {
     my $self    = shift;
     my $session = shift;
 
     flock($self->{fh}, LOCK_UN);  <<--- line 109
 
     if ($self->{opened}) {
         close $self->{fh} || die $!;
     }
 
     $self->{opened} = 0;
     $self->{read}   = 0;
     $self->{write}  = 0;
   }

So something is screwing up the $self that should be passed to
Apache::Session::Lock::File::release_all_locks() by DESTROY(). Since
this only seems to happen when these two modules play together, it's
been difficult for me to try and find what the problem is. Anyone have
any ideas or see a similar thing on their systems? My config is mod_perl
1.24 / Apache 1.3.12 / Solaris 8.

Thanks,
Nate