Apache profiler errors

[prev] [thread] [next] [Date index for 2004/11/02]

From: Jason Dixon
Subject: Apache profiler errors
Date: 15:30 on 02 Nov 2004
Note:  Folks on perlmonks might recognize this post from last night.  
There have been no responses, so I'm posting it to the mod_perl list.

I'm trying to profile some perl CGI someone else wrote, but I can't 
seem to get Apache::DProf working.  My server runs Apache 2.0.46 with 
mod_perl 1.99 and Apache::DProf 0.09.  I'm getting the following error 
when trying to start Apache when Apache::DProf is set to load in 
httpd.conf:

<code>
Starting httpd: [Mon Nov 01 22:37:13 2004] [error] Can't locate object 
method "server_root_relative" via package "Apache::Server" at 
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Apache/DProf.pm 
line 30.!Compilation failed in require at (eval 2) line 3.!
[Mon Nov 01 22:37:13 2004] [error] Can't load Perl module Apache::DProf 
for server localhost:0, exiting...!
</code>

Now, if I'm not mistaken, server_root_relative is in 
Apache::ServerUtil.  Looking at the relevant portion of DProf.pm, it 
appears to handle the differences between Apache1 and Apache2 
correctly, so Apache::compat shouldn't be necessary (although I've 
tried that too):

<code>
package Apache::DProf;

use strict;
use Apache::DB ();
use File::Path ();

{
     no strict;
     $VERSION = '0.04';
}

# Need to determine if we are in a mod_perl 1.x or 2.x environment
# and load the appropriate modules
BEGIN {
         use constant MP2 => eval { require mod_perl; $mod_perl::VERSION 
 > 1.99 };
         die "mod_perl is required to run this module: $@" if $@;

         if (MP2) {
                 require Apache2;
                 require Apache::RequestRec;
                 require Apache::ServerUtil;
         }
}


# Adjust to handle mp1 and mp2 differently
my $prof_path;
if (MP2) {
     my $s = Apache->server;
     $prof_path = $s->server_root_relative( $ENV{APACHE_DPROF_PATH} ||
                                            "logs/dprof");
}
else {
     $prof_path = Apache->server_root_relative($ENV{APACHE_DPROF_PATH} ||
                                            "logs/dprof");
}
</code>

Any ideas why this module is failing for me?  I've tried Googling on 
the server_root_relative error, but this inevitably directs me to 
Apache::compat suggestions, which I don't think are relevant to this 
module.

Thanks,

--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net


        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

Apache profiler errors
Jason Dixon 15:30 on 02 Nov 2004

Re: Apache profiler errors
Perrin Harkins 15:35 on 02 Nov 2004

Re: Apache profiler errors
Jason Dixon 15:45 on 02 Nov 2004

Re: Apache profiler errors
Perrin Harkins 15:56 on 02 Nov 2004

Re: Apache profiler errors
Frank Wiles 15:37 on 02 Nov 2004

Re: Apache profiler errors
Jason Dixon 15:44 on 02 Nov 2004

Re: Apache profiler errors
Frank Wiles 15:59 on 02 Nov 2004

Re: Apache profiler errors
Jason Dixon 16:03 on 02 Nov 2004

Re: Apache profiler errors
Frank Wiles 16:15 on 02 Nov 2004

Re: Apache profiler errors
Randy Kobes 17:03 on 02 Nov 2004

Re: Apache profiler errors
Jason Dixon 16:24 on 02 Nov 2004

Re: Apache profiler errors
Frank Wiles 16:28 on 02 Nov 2004

Re: Apache profiler errors
Tom Schindl 17:51 on 02 Nov 2004

Re: Apache profiler errors
Frank Wiles 18:03 on 02 Nov 2004

Generated at 09:30 on 27 Apr 2005 by mariachi v0.52