Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have just recently installed mod_perl. I am able to succesfuly run simple scripts using both the API and Apache::Registry. I have a CGI::Application script that works from both the command line and just apache. However when I attempt to run it with mod perl I get this error log file that is not helpful at all. It does not resemble a normal apache error file (at least with me eyese). I know I can use Apache::Debug, but I dont even know where to place it within the script. I'm basiclly clueless. If anyone can throw me a bone, it would be greatly appreciated. Heres the error log
[Thu Oct 23 10:53:17 2003] -e: subnets::subnetTable('subnets=HASH(0x8 +14703c)') called at /usr/local/lib/perl5/site_perl/5.8.0/CGI/Applicat +ion.pm line 142 [Thu Oct 23 10:53:17 2003] -e: eval {...} called at /usr/local/lib/pe +rl5/site_perl/5.8.0/CGI/Application.pm line 142 [Thu Oct 23 10:53:17 2003] -e: CGI::Application::run('subnets=HASH(0x +814703c)') called at /usr/local/apache2/perl/lib/subnetApp.pl line 8 [Thu Oct 23 10:53:17 2003] -e: ModPerl::ROOT::ModPerl::Registry::usr_ +local_apache2_perl_lib_subnetApp_2epl::handler('Apache::RequestRec=SC +ALAR(0x81a6a50)') called at /usr/local/lib/perl5/site_perl/5.8.0/i686 +-linux/Apache2/ModPerl/RegistryCooker.pm line 184 [Thu Oct 23 10:53:17 2003] -e: eval {...} called at /usr/local/lib/pe +rl5/site_perl/5.8.0/i686-linux/Apache2/ModPerl/RegistryCooker.pm line + 184 [Thu Oct 23 10:53:17 2003] -e: ModPerl::RegistryCooker::run('ModPerl: +:Registry=HASH(0x81a6984)') called at /usr/local/lib/perl5/site_perl/ +5.8.0/i686-linux/Apache2/ModPerl/RegistryCooker.pm line 154 [Thu Oct 23 10:53:17 2003] -e: ModPerl::RegistryCooker::default_handl +er('ModPerl::Registry=HASH(0x81a6984)') called at /usr/local/lib/perl +5/site_perl/5.8.0/i686-linux/Apache2/ModPerl/Registry.pm line 16 [Thu Oct 23 10:53:17 2003] -e: ModPerl::Registry::handler('ModPerl::R +egistry','Apache::RequestRec=SCALAR(0x81a6a50)') called at /usr/local +/lib/perl5/site_perl/5.8.0/HTML/Template.pm line 0 [Thu Oct 23 10:53:17 2003] -e: eval {...} called at /usr/local/lib/pe +rl5/site_perl/5.8.0/HTML/Template.pm line 0

Replies are listed 'Best First'.
Re: ugly mod perl error log
by talexb (Chancellor) on Oct 23, 2003 at 18:38 UTC

    It looks like what you've posted is info messages, and not anything that went bump in the night (that is, errors). It also looks like you are using HTML::Template .. I haven't used HTML::Template with mod_perl, but I wonder if there are any complications in combining the two.

    I won't tell you to use the Perl debugger since that got me roasted alive the last time I suggested it, but I can highly recommend Log::Log4perl as an aid to debugging .. again, I haven't used that under mod_perl, but it should work.

    Finally, dare I ask .. what were you expecting to happen? What makes you think that it's not working?

    Good luck!

    --t. alex
    Life is short: get busy!
      HTML::Template and Log::Log4perl both work just fine with mod_perl. I use the Perl debugger all the time, and I would encourage everyone to learn how, but in this case it just looks like some strange reporting option has been turned on.
Re: ugly mod perl error log
by perrin (Chancellor) on Oct 23, 2003 at 18:31 UTC
    I've never seen this "-e" stuff before. Did you turn on some kind of debugging mode in CGI::Application? Are you running the latest mod_perl 2? You might want to ask on the mod_perl list.
Re: ugly mod perl error log
by hossman (Prior) on Oct 24, 2003 at 07:31 UTC

    This is a stack trace. it just doesn't look like it because each line is getting a time stamp.

    It looks like the output you would see if you're script was written to use Carp and then called "cluck" (or maybe "confess")

    i would take a good hard look at your "subnets::subnetTable" function .. either it is generating this stack trace, or you havent' given us the full log, and you're calling something that is generating this.