Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
There's more than one way to do things
 
PerlMonks  

Code Profiling with Apache::DProf - Getting Error!

by vi_srikanth (Acolyte)
on Jun 07, 2007 at 08:02 UTC ( #619761=perlquestion: print w/ replies, xml ) Need Help??
vi_srikanth has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I am unable to use Apache::DProf! Please help.

This is what I have in httpd.conf:

  <FilesMatch "^.*\.pl$">
    SetHandler perl-script
    PerlHandler Apache::Registry
    PerlModule  Apache::DProf
  </FilesMatch>

  # Startup script (runs when apache starts)
  PerlRequire "/srv/spark/conf/startup.pl"

If I execute a perl file through browser, I am getting the following error in the error_log:

[error] Undefined subroutine &Apache::Registry::handler called.\n

as well as getting "Internal Server Error" in the browser.

If I remove the line "PerlModule Apache::DProf" from the httpd.conf, the page is properly getting loaded in the browser without reporting any error.

Kindly help.

Thanks
Srikanth

Comment on Code Profiling with Apache::DProf - Getting Error!
Re: Code Profiling with Apache::DProf - Getting Error!
by sen (Hermit) on Jun 07, 2007 at 09:49 UTC

    Please try this,

    Load Apache::Registry, then include the handler, before the PerlHandler Apache::Registry bit. Suggest also that you do all the module loading/startup before specifying any handlers

    eg . from my mod_perl.conf

    PerlRequire conf/startup.pl PerlFreshRestart on PerlSetVar StatusOptionsAll On PerlSetVar StatusTerse On PerlSetVar StatusTerseSize On PerlSetVar StatusTerseSizeMainSummary On Alias /perl-bin/ /usr/local/apache/mod_perl/ PerlModule Apache::DProf PerlModule Apache::Registry PerlModule B::TerseSize PerlModule Apache::Status <Location /perl-bin> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On allow from all </Location>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://619761]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2014-04-19 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls