RE: Debug perl package in Apache

2001-02-12 Thread Sander van Zoest

On Sun, 11 Feb 2001, Wang, Pin-Chieh wrote:

> First I can't put the  block at the beginning of the
> http.conf (I got httpd.conf syntax error 
> when I run httpd -X -DPERLDB; Then I move the block to the end of the
> http.conf file re-run the command then I get
> % ./bin/httpd -X -DPERLDB
> [notice] Apache::DB initialized in child 23415

You can only call this after you have loaded modperl and such. 
So it might be related to that.
  
> the system is waiting for my call the request.
> But when I call http://localhost/server-status I still don't got the debug
> prompt. here I called server-status instead of perl-status. I guess I don't
> understand how Debuger is configured into perl-status when
> http://localhost/perl-status is called.
> can you share some light on this?

This is because you can only use Apache::DB to debug perl code. 
mod_status.c (i.e. server-status) is written in C, so you will need to
use a C debugger such as gdb or dbx. See the earlier thread on that for
some useful hints.
  
Hope that helps,

--
Sander van Zoest [[EMAIL PROTECTED]]
Covalent Technologies, Inc.   http://www.covalent.net/
(415) 536-5218 http://www.vanzoest.com/sander/




RE: Debug perl package in Apache

2001-02-11 Thread Wang, Pin-Chieh

Hi Sander,
Thanks for the info, I read the article you suggested, and try to testout
the server-status (as oppose to the perl-status
as the example suggested,) but my testing was not quite right, hope you can
answer my questions

First I can't put the  block at the beginning of the
http.conf (I got httpd.conf syntax error 
when I run httpd -X -DPERLDB; Then I move the block to the end of the
http.conf file re-run the command then I get
% ./bin/httpd -X -DPERLDB
[notice] Apache::DB initialized in child 23415

the system is waiting for my call the request.
But when I call http://localhost/server-status I still don't got the debug
prompt. here I called server-status instead of perl-status. I guess I don't
understand how Debuger is configured into perl-status when
http://localhost/perl-status is called.
can you share some light on this?

Thanks,
PC
 The following is the additions in httpd.conf as described in the article.




   
  use Apache::DB ();
  Apache::DB->init;
   

   
  PerlFixupHandler Apache::DB
   



In our first example, we will debug the standard Apache::Status module,
which is configured like so: 
PerlModule Apache::Status

PerlHandler Apache::Status
SetHandler perl-script


When the server is started with the debugging flag, a notice will be printed
to the console: 


-Original Message-
From: Sander van Zoest [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 5:04 PM
To: Wang, Pin-Chieh
Cc: Mod_perl list (E-mail); 'Stas Bekman'
Subject: Re: Debug perl package in Apache


On Thu, 8 Feb 2001, Wang, Pin-Chieh wrote:

> Any body has any ideals?  Also How can I debug an perl package under this
> environment?
> Appreciated for any help

Check out this useful article written by Dough MacEachern for PerlMonth.
<http://www.perlmonth.com/features/mod_perl/mod_perl.html?issue=2>

Cheers,

--
Sander van Zoest
[[EMAIL PROTECTED]]
Covalent Technologies, Inc.
http://www.covalent.net/
(415) 536-5218
http://www.vanzoest.com/sander/



Re: Debug perl package in Apache

2001-02-08 Thread Sander van Zoest

On Thu, 8 Feb 2001, Wang, Pin-Chieh wrote:

> Any body has any ideals?  Also How can I debug an perl package under this
> environment?
> Appreciated for any help

Check out this useful article written by Dough MacEachern for PerlMonth.


Cheers,

--
Sander van Zoest [[EMAIL PROTECTED]]
Covalent Technologies, Inc.   http://www.covalent.net/
(415) 536-5218 http://www.vanzoest.com/sander/




Re: Debug perl package in Apache

2001-02-08 Thread G.W. Haywood

Hi there,

On Thu, 8 Feb 2001, Wang, Pin-Chieh wrote:

> But AuthenNISPlus.pm exited with "Not an ARRAY reference at line 58
> look at this program from line 57 are
> 
>   foreach ($pwd_table->list()){

print STDERR "Argument list = [", $_, "]\n";

> if(@{$_}[0] eq $name){
>   $pwd = @{$_}[1];
>   $group = @{$_}[3];
>   last;

> Any body has any ideals?  Also How can I debug an perl package under
> this environment?

http://perl/apache.org/guide

HTH
73,
Ged.