我安装了以下版本:
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]
非常感谢任何建议。
感谢。
答案 0 :(得分:1)
使用Devel::NYTProf::Apache实际上您可能会更轻松:
# in your Apache config file with mod_perl installed
PerlPassEnv NYTPROF
PerlModule Devel::NYTProf::Apache