You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Richard Jones <ra...@dpw.clara.co.uk> on 2007/09/12 22:19:47 UTC
Problem with perl-status memory usage
Have setup perl-status according to the information in Practical
mod_perl (Ch9.4), and am using Apache/2.2.3 mod_perl/2.0.2 on a Linux
system running the XAMPP package. All perl-status functions seem to work
OK, except memory usage which generates a 500 error:
[Wed Sep 12 11:45:59 2007] [error] [client 127.0.0.1] Can't locate
object method "rnew" via package "Devel::Symdump" (perhaps you forgot to
load "Devel::Symdump"?) at
/opt/lampp/lib/perl5/site_perl/5.8.7/i686-linux/B/TerseSize.pm line
632.\n, referer: http://xxx.xxx.xxx.xxx/perl-status
The mod_perl enabled XAMPP Apache server is listening on localhost:81
for addresses ProxyPass'd from a front-end Apache server.
Both packages referred to in the error message are installed and up to date:
B::TerseSize is up to date (0.09)
Devel::Symdump is up to date (2.07)
I can't find anything previously about this. Does anyone have any ideas?
--
Richard Jones
Re: Problem with perl-status memory usage
Posted by Michael Peters <mp...@plusthree.com>.
Richard Jones wrote:
> gives me a nice Data::Dumper data structure in the browser window. It
> probably doesn't make much sense as programming logic as I don't
> normally use Devel::Symdump, but I guess it shows the module is OK?
The original error message was this:
[Wed Sep 12 11:45:59 2007] [error] [client 127.0.0.1] Can't locate
object method "rnew" via package "Devel::Symdump" (perhaps you forgot to
load "Devel::Symdump"?) at
/opt/lampp/lib/perl5/site_perl/5.8.7/i686-linux/B/TerseSize.pm line
632.\n, referer: http://xxx.xxx.xxx.xxx/perl-status
Maybe it's as simple as B::TerseSize simplying not using/requiring Devel::Symdump?
--
Michael Peters
Developer
Plus Three, LP
Re: Problem with perl-status memory usage
Posted by Richard Jones <ra...@dpw.clara.co.uk>.
Perrin Harkins wrote:
> On 9/14/07, RA Jones <ra...@dpw.clara.co.uk> wrote:
>> Yes, user 'nobody' gets a display on 'cat
>> /opt/lampp/lib/perl5/site_perl/5.8.7/Devel/Symdump.pm'
>
> Okay, can you try making your own mod_perl handler that loads
> Devel::Symdump and see if it works?
>
Sorry it's taken a while. A simple handler:
require Devel::Symdump;
my $obj = Devel::Symdump->new( 'DBI' );
print "Content-type: text/html\n\n;
print Dumper $obj;
return Apache2::Const::OK;
gives me a nice Data::Dumper data structure in the browser window. It
probably doesn't make much sense as programming logic as I don't
normally use Devel::Symdump, but I guess it shows the module is OK?
--
Richard Jones
Re: Problem with perl-status memory usage
Posted by Perrin Harkins <pe...@elem.com>.
On 9/14/07, RA Jones <ra...@dpw.clara.co.uk> wrote:
> Yes, user 'nobody' gets a display on 'cat
> /opt/lampp/lib/perl5/site_perl/5.8.7/Devel/Symdump.pm'
Okay, can you try making your own mod_perl handler that loads
Devel::Symdump and see if it works?
- Perrin
Re: Problem with perl-status memory usage
Posted by RA Jones <ra...@dpw.clara.co.uk>.
Perrin Harkins wrote:
> On 9/13/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
>
>> /opt/lampp/lib/perl5/site_perl/5.8.7/Devel/Symdump.pm
>>
>
> Ok, the next thing to try is a permissions check. Become the user who
> you run your web server as (often "nobody", but I don't know what
> XAMPP does) and try to read this file.
>
> - Perrin
>
>
Yes, user 'nobody' gets a display on 'cat
/opt/lampp/lib/perl5/site_perl/5.8.7/Devel/Symdump.pm'
--
Richard Jones
Re: Problem with perl-status memory usage
Posted by Perrin Harkins <pe...@elem.com>.
On 9/13/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
> /opt/lampp/lib/perl5/site_perl/5.8.7/Devel/Symdump.pm
Ok, the next thing to try is a permissions check. Become the user who
you run your web server as (often "nobody", but I don't know what
XAMPP does) and try to read this file.
- Perrin
Re: Problem with perl-status memory usage
Posted by Richard Jones <ra...@dpw.clara.co.uk>.
Perrin Harkins wrote:
> On 9/12/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
>> /opt/lampp/bin/perl -e 'print join "\n", @INC':
>
> No, print @INC from mod_perl, not from the command line.
>
Sorry, yes that was silly. From an equivalent script inside the /perl
directory (which is set in perl.conf to be processed by
ModPerl::Registry) and called from a browser:
/home/raj/www/perl-lib # path to my perl lib
/opt/lampp/lib/perl5/5.8.7/i686-linux
/opt/lampp/lib/perl5/5.8.7
/opt/lampp/lib/perl5/site_perl/5.8.7/i686-linux
/opt/lampp/lib/perl5/site_perl/5.8.7
/opt/lampp/lib/perl5/site_perl
.
/opt/lampp
ie it ought to be able to find
/opt/lampp/lib/perl5/site_perl/5.8.7/Devel/Symdump.pm
--
Richard Jones
Re: Problem with perl-status memory usage
Posted by Perrin Harkins <pe...@elem.com>.
On 9/12/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
> /opt/lampp/bin/perl -e 'print join "\n", @INC':
No, print @INC from mod_perl, not from the command line.
- Perrin
Re: Problem with perl-status memory usage
Posted by Richard Jones <ra...@dpw.clara.co.uk>.
Perrin Harkins wrote:
> On 9/12/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
>> I'm pretty sure the XAMPP Apache server is using its own Perl rather
>> than the default /usr/bin/perl as I have a large number of dependencies
>> for my mod_perl web apps which do not exist under the default perl lib
>> path.
>
> Check it by finding the directory your Devel::Sympdump is in and
> seeing if it's in your mod_perl server's @INC.
find / -name Symdump.pm:
/opt/lampp/lib/perl5/site_perl/5.8.7/Devel/Symdump.pm
/opt/lampp/bin/perl -e 'print join "\n", @INC':
/opt/lampp/lib/perl5/site_perl/5.8.7 (+ others under /opt/lampp)
But can I be absolutely sure the XAMPP mod_perl server *is* using the
libraries under /opt/lampp/lib? I think so because
$ENV{SERVER_SIGNATURE} from a printenv script lists Perl/v5.8.7, which
is the version of Perl bundled with XAMPP, whereas the default Mandrake
install is v5.8.5.
--
Richard Jones
Re: Problem with perl-status memory usage
Posted by Perrin Harkins <pe...@elem.com>.
On 9/12/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
> I'm pretty sure the XAMPP Apache server is using its own Perl rather
> than the default /usr/bin/perl as I have a large number of dependencies
> for my mod_perl web apps which do not exist under the default perl lib
> path.
Check it by finding the directory your Devel::Sympdump is in and
seeing if it's in your mod_perl server's @INC.
- Perrin
Re: Problem with perl-status memory usage
Posted by Richard Jones <ra...@dpw.clara.co.uk>.
Perrin Harkins wrote:
> On 9/12/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
>> Both packages referred to in the error message are installed and up to date
>
> Do you have more than one perl on this system? Maybe XAMPP installs a
> separate one.
Yes, XAMPP has its own Perl, but I ensure I install packages using
'/opt/lampp/bin/perl -MCPAN -e shell'.
I'm pretty sure the XAMPP Apache server is using its own Perl rather
than the default /usr/bin/perl as I have a large number of dependencies
for my mod_perl web apps which do not exist under the default perl lib
path.
'which perl' points to /usr/local/bin/perl which is an alias to the
XAMPP /opt/lampp/bin/perl, and 'perl -V' points to the
/opt/lampp/lib/perl5 libraries.
But still, maybe some conflict between the two Perls?
--
Richard Jones
Re: Problem with perl-status memory usage
Posted by Perrin Harkins <pe...@elem.com>.
On 9/12/07, Richard Jones <ra...@dpw.clara.co.uk> wrote:
> Both packages referred to in the error message are installed and up to date
Do you have more than one perl on this system? Maybe XAMPP installs a
separate one.
- Perrin