You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Ruslan V. Sulakov" <ru...@zr.ru> on 2002/07/24 15:20:20 UTC
Apache::DProf
I have troubles using Apache::DProf
I try to use it as described at:
http://perl.apache.org/docs/1.0/guide/performance.html#Code_Profiling_Techni
ques
But when my httpd.conf has a line:
PerlModule Apache::DProf
apache reply with error 500 (Internal Server Error) when I request a perl
script, that runs under mod_perl
Without this line, all works fine!
Errorlog shows following message during each request:
[Sat Jul 20 07:34:28 2002] [error] Undefined subroutine
&Apache::Registry::handler called.
I have in my httpd.conf
<Files *.pl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
PerlModule Apache::DProf
PerlRequire /path/to/my/modules/modperl_startup.pl
</Files>
Is here something wrong?
How can I have Apache::DProf worked for profiling my code?
Thanks in advance.
Ruslan
Re: Apache::DProf
Posted by Chris Newman <ch...@investis.com>.
Think you need to load in Apache::Registry with :
PerlModule Apache::Registry
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>
On Wednesday 24 Jul 2002 2:20 pm, Ruslan V. Sulakov wrote:
> I have troubles using Apache::DProf
> I try to use it as described at:
> http://perl.apache.org/docs/1.0/guide/performance.html#Code_Profiling_Techn
>i ques
>
> But when my httpd.conf has a line:
> PerlModule Apache::DProf
> apache reply with error 500 (Internal Server Error) when I request a perl
> script, that runs under mod_perl
>
> Without this line, all works fine!
>
> Errorlog shows following message during each request:
> [Sat Jul 20 07:34:28 2002] [error] Undefined subroutine
> &Apache::Registry::handler called.
>
>
> I have in my httpd.conf
> <Files *.pl>
> SetHandler perl-script
> PerlHandler Apache::Registry
> PerlSendHeader On
> Options +ExecCGI
> PerlModule Apache::DProf
> PerlRequire /path/to/my/modules/modperl_startup.pl
> </Files>
>
> Is here something wrong?
> How can I have Apache::DProf worked for profiling my code?
>
> Thanks in advance.
> Ruslan
Re: @INC
Posted by "Ruslan V. Sulakov" <ru...@zr.ru>.
Thanks, Ilya! You are right!
/usr/bin/perl contains old binary from v5.00503
So, I've change it to a link pointing to /usr/local/bin/perl
Now all works fine!
Ruslan
> Looks like your sys admin had installed perl from core and from ports
> and as result you have two perl installation on systems. Perl from
> core (5.00503) likely to have is binary in /usr/bin/perl and perl from
> ports (5.6.1) in /usr/local/bin/perl.
>
> If your PATH doesn't have /usr/local/bin or it comes after /usr/bin
> than 'perl Makefile.PL' uses perl from core. Try either changing your
> PATH or using full path to perl (i.e. /usr/local/bin/perl
> Makefile.PL).
Re: @INC
Posted by Ilya Martynov <il...@martynov.org>.
>>>>> On Mon, 29 Jul 2002 13:43:13 +0400, "Ruslan V. Sulakov" <ru...@zr.ru> said:
RVS> My @INC contains WRONG directories!!! Help!
RVS> How can I change @INC in perl for installing of Apache::SubProcess and other
RVS> modules?
RVS> At this time I cannot install any Apache::* related modules, because of bad
RVS> @INC
RVS> Platform: FreeBSD
RVS> I have Apache::* modules installed in:
RVS> /usr/local/lib/perl5/site_perl/5.6.1/mach/Apache/
RVS> But I cannot install needed modules:
RVS> oasis2# tar -zxf Apache-SubProcess-0.03.tar.gz
RVS> oasis2# cd Apache-SubProcess-0.03
RVS> oasis2# perl Makefile.PL
RVS> Can't locate Apache/src.pm in @INC (@INC contains: ../lib
RVS> /usr/libdata/perl/5.00503/mach /
RVS> usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
RVS> /usr/local/lib/
RVS> perl5/site_perl/5.005 .) at Makefile.PL line 4.
RVS> BEGIN failed--compilation aborted at Makefile.PL line 4.
RVS> oasis2#
Looks like your sys admin had installed perl from core and from ports
and as result you have two perl installation on systems. Perl from
core (5.00503) likely to have is binary in /usr/bin/perl and perl from
ports (5.6.1) in /usr/local/bin/perl.
If your PATH doesn't have /usr/local/bin or it comes after /usr/bin
than 'perl Makefile.PL' uses perl from core. Try either changing your
PATH or using full path to perl (i.e. /usr/local/bin/perl
Makefile.PL).
--
Ilya Martynov (http://martynov.org/)
@INC
Posted by "Ruslan V. Sulakov" <ru...@zr.ru>.
My @INC contains WRONG directories!!! Help!
How can I change @INC in perl for installing of Apache::SubProcess and other
modules?
At this time I cannot install any Apache::* related modules, because of bad
@INC
Platform: FreeBSD
I have Apache::* modules installed in:
/usr/local/lib/perl5/site_perl/5.6.1/mach/Apache/
But I cannot install needed modules:
oasis2# tar -zxf Apache-SubProcess-0.03.tar.gz
oasis2# cd Apache-SubProcess-0.03
oasis2# perl Makefile.PL
Can't locate Apache/src.pm in @INC (@INC contains: ../lib
/usr/libdata/perl/5.00503/mach /
usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/
perl5/site_perl/5.005 .) at Makefile.PL line 4.
BEGIN failed--compilation aborted at Makefile.PL line 4.
oasis2#
Thanks in advance!
Ruslan