You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael D Schleif <md...@helices.org> on 2003/12/18 08:31:18 UTC

Apache::DB - Undefined subroutine ???

I am trying to setup Apache::DB on my Debian box.

In httpd.conf I have this inside my mod_perl Location directive:

   PerlFixupHandler Apache::DB

I PerlRequire this, according to the manpage:

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

After stopping apache, I start it from CLI:

   sudo apache -X

As soon as I try to render something in the browser, I get this in
error.log:

   [error] Undefined subroutine &Apache::Status::handler called.

Eventually, I get perldb prompts; but, they do not behave as I expect.
I have been studying this:

   <http://perl.apache.org/docs/1.0/guide/debug.html#Introduction_to_the_Perl_Debugger>

I have not found reference to the subject error.

What do you think?

-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--

Re: Apache::DB - Undefined subroutine ???

Posted by Stas Bekman <st...@stason.org>.
Michael D Schleif wrote:
[...]
> Yes, that is further down on that page, and I meant that I am working
> with the whole Perl debugging section.  I thought -- erroneously? --
> that I could PerlRequire the `use' and `init' stuff.  How can I do that?

Sure you can. it's better to keep it in httpd.conf so it's not hidden in the 
startup file.

>>The suggested config section should work just fine:
>>
>>  <Perl>
>>      use Apache::DB ();
>>      Apache::DB->init;
>>  </Perl>
>>  <Location />
>>      PerlFixupHandler Apache::DB
>>  </Location>
>>  PerlModule Apache::Status
>>  <Location /perl-status>
>>      PerlHandler Apache::Status
>>      SetHandler perl-script
>>  </Location>
>>
>>make sure that you do *not* preload Apache::Status before you init 
>>Apache::DB
> 
> 
> I do not know why problems persist: `Undefined subroutine
> &Apache::Status::handler called.'  Perhaps, a look at my httpd.conf
> will help?
> 
>    <http://helices.org/tmP/httpd.conf>
> 
> NOTE: That server is *not* the one in question ;>

what about startup.pl in 'PerlRequire startup.pl'? Make sure you don't load it 
from startup.pl as well.

> I want to setup Apache::DB in such a way that it is easily turned OFF,
> since most of the time I do not want it interfering.

You already did that as the docs suggest:

<IfDefine PERLDB>
     <Perl>
         use Apache::DB ();
         Apache::DB->init;
     </Perl>
     <Location />
         PerlFixupHandler Apache::DB
     </Location>
</IfDefine>

Only when you start the server with httpd -DPERLDB (and -X) it'll work.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Apache::DB - Undefined subroutine ???

Posted by Michael D Schleif <md...@helices.org>.
Stas Bekman <st...@stason.org> [2003:12:17:23:51:14-0800] scribed:
> Michael D Schleif wrote:
> >I am trying to setup Apache::DB on my Debian box.
> >
> >In httpd.conf I have this inside my mod_perl Location directive:
> >
> >   PerlFixupHandler Apache::DB
> >
> >I PerlRequire this, according to the manpage:
> >
> >   use Apache::DB ();
> >   Apache::DB->init;
> >   1;
> >
> >After stopping apache, I start it from CLI:
> >
> >   sudo apache -X
> >
> >As soon as I try to render something in the browser, I get this in
> >error.log:
> >
> >   [error] Undefined subroutine &Apache::Status::handler called.
> >
> >Eventually, I get perldb prompts; but, they do not behave as I expect.
> >I have been studying this:
> >
> >   <http://perl.apache.org/docs/1.0/guide/debug.html#Introduction_to_the_Perl_Debugger>
> >
> >I have not found reference to the subject error.
> 
> I think you are rather talking about:
> http://perl.apache.org/docs/1.0/guide/debug.html#Interactive_mod_perl_Debugging
> And you probably have missed this note:
> 
>   This section should be at the top of the Perl configuration section
>   of the configuration file, before any other Perl code is pulled in,
>   so that debugging symbols will be inserted into the syntax tree,
>   triggered by the call to Apache::DB->init.

Yes, that is further down on that page, and I meant that I am working
with the whole Perl debugging section.  I thought -- erroneously? --
that I could PerlRequire the `use' and `init' stuff.  How can I do that?

> The suggested config section should work just fine:
> 
>   <Perl>
>       use Apache::DB ();
>       Apache::DB->init;
>   </Perl>
>   <Location />
>       PerlFixupHandler Apache::DB
>   </Location>
>   PerlModule Apache::Status
>   <Location /perl-status>
>       PerlHandler Apache::Status
>       SetHandler perl-script
>   </Location>
> 
> make sure that you do *not* preload Apache::Status before you init 
> Apache::DB

I do not know why problems persist: `Undefined subroutine
&Apache::Status::handler called.'  Perhaps, a look at my httpd.conf
will help?

   <http://helices.org/tmP/httpd.conf>

NOTE: That server is *not* the one in question ;>

I want to setup Apache::DB in such a way that it is easily turned OFF,
since most of the time I do not want it interfering.

What do you think?

-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--

Re: Apache::DB - Undefined subroutine ???

Posted by Stas Bekman <st...@stason.org>.
Michael D Schleif wrote:
> I am trying to setup Apache::DB on my Debian box.
> 
> In httpd.conf I have this inside my mod_perl Location directive:
> 
>    PerlFixupHandler Apache::DB
> 
> I PerlRequire this, according to the manpage:
> 
>    use Apache::DB ();
>    Apache::DB->init;
>    1;
> 
> After stopping apache, I start it from CLI:
> 
>    sudo apache -X
> 
> As soon as I try to render something in the browser, I get this in
> error.log:
> 
>    [error] Undefined subroutine &Apache::Status::handler called.
> 
> Eventually, I get perldb prompts; but, they do not behave as I expect.
> I have been studying this:
> 
>    <http://perl.apache.org/docs/1.0/guide/debug.html#Introduction_to_the_Perl_Debugger>
> 
> I have not found reference to the subject error.

I think you are rather talking about:
http://perl.apache.org/docs/1.0/guide/debug.html#Interactive_mod_perl_Debugging
And you probably have missed this note:

   This section should be at the top of the Perl configuration section
   of the configuration file, before any other Perl code is pulled in,
   so that debugging symbols will be inserted into the syntax tree,
   triggered by the call to Apache::DB->init.

The suggested config section should work just fine:

   <Perl>
       use Apache::DB ();
       Apache::DB->init;
   </Perl>
   <Location />
       PerlFixupHandler Apache::DB
   </Location>
   PerlModule Apache::Status
   <Location /perl-status>
       PerlHandler Apache::Status
       SetHandler perl-script
   </Location>

make sure that you do *not* preload Apache::Status before you init Apache::DB

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html