2009-06-22 71 views
1

我已經安裝了以下版本:如何配置Devel :: SmallProf以使用mod_perl?

Apache::SmallProf - 0.09 
Apache::Registry - 2.01 
Devel::SmallProf - 2.02 

我嘗試在我的Apache的配置文件(/usr/local/apache_modperl/conf/httpd.conf)增加如下設置:

<Perl> 
    require Apache::DB; 
    Apache::DB->init; 
</Perl> 

<Directory /home/website/www/cgi-m> 
    SetHandler perl-script 

    PerlSetVar Filter on 
    PerlSetVar CleanLevel 5 
    PerlAddVar CleanOption whitespace 

    PerlHandler Apache::Registry 
    PerlFixupHandler Apache::SmallProf 

    Options ExecCGI 
</Directory> 

當我第一次被要求通過運行Web瀏覽器CGI,這裏是錯誤消息我得到:

[doraemon] [modperl] [Mon Jun 22 07:20:39 2009] [error] /usr/local/apache_modperl//logs/smallprof does not exist: No such file or directory at /usr/local/lib/perl/5.8.8/Apache/SmallProf.pm line 46.\n [failed] [Connection refused] 

確定。至少我知道smallprof正在嘗試運行。因此,我手動創建目錄/ usr/local/apache_modperl/logs/smallprof,並確保它可以被任何人寫入。

我再試一次:

[doraemon] [modperl] Attempt to free unreferenced scalar: SV 0x11a9ac78, Perl interpreter: 0x9e6ba80 at (null) line 236. [failed] [Connection refused] 
[doraemon] [modperl] [Mon Jun 22 07:22:22 2009] [notice] child pid 10203 exit signal Segmentation fault (11) [success] 

任何意見將非常感激。

謝謝。

回答

1

你實際上可能有Devel::NYTProf::Apache更輕鬆地:

# in your Apache config file with mod_perl installed 
PerlPassEnv NYTPROF 
PerlModule Devel::NYTProf::Apache