You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Steve Fosdick <st...@aom.bt.co.uk> on 2001/11/26 11:21:36 UTC

Undefined Subroutine Problems

We have an application using Apache::ASP which worked fine when there 
were just a few people using it but since user number have increased we 
have started to get "Internal Server Error" return to clients in a few 
odd cases and messages like:

[Sat Nov 24 20:48:34 2001] [error] [asp] [7228] [error] Undefined 
subroutine 
&Apache::ASP::Compiles::_home_indigo_releases_r2_2_app_global_asa::db_seqnext 
called at (eval 132) line 27. <--> , /usr/share/perl5/Apache/ASP.pm line 
1471

appearing in the error log.  This is currently with Apache::ASP 2.21 
(debian package - the ASP.pm appears to be version 2.07).   I tried 
Apache::ASP 2.27 and the problem was very much worse with that version 
hence having reverted to 2.21.  So..

1. Has anyone seen this before or know anything about what is going on.

2. Has the problem been addresses specifically in 2.29?

3. Are then any tools or debug settings that may help gather enough 
information to debug this?

Steve.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Undefined Subroutine Problems

Posted by Joshua Chamas <jo...@chamas.com>.
Steve Fosdick wrote:
> 
> The affected pages are served from a named virtual host and I have
> $Apache::Registry::NameWithVirtualHost = 1; in the config file.
> 

I don't think this will end up mattering, since by default
the package name created to compile perl scripts into is 
Global directory name derived, which defaults to the current
directory of the script if none is defined.  I do not think
that using name based virtual hosts will create some confusion
here, but this will be better determined from some error_log
trace with PerlSetVar -1

-- Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Undefined Subroutine Problems

Posted by Steve Fosdick <st...@aom.bt.co.uk>.
Steve Fosdick wrote:

> We have an application using Apache::ASP which worked fine when there 
> were just a few people using it but since user number have increased 
> we have started to get "Internal Server Error" return to clients in a 
> few odd cases and messages like:
>
> [Sat Nov 24 20:48:34 2001] [error] [asp] [7228] [error] Undefined 
> subroutine 
> &Apache::ASP::Compiles::_home_indigo_releases_r2_2_app_global_asa::db_seqnext 
> called at (eval 132) line 27. <--> , /usr/share/perl5/Apache/ASP.pm 
> line 1471
>
> appearing in the error log.  This is currently with Apache::ASP 2.21 
> (debian package - the ASP.pm appears to be version 2.07).   I tried 
> Apache::ASP 2.27 and the problem was very much worse with that version 
> hence having reverted to 2.21.  So..
>
> 1. Has anyone seen this before or know anything about what is going on.
>
> 2. Has the problem been addresses specifically in 2.29?
>
> 3. Are then any tools or debug settings that may help gather enough 
> information to debug this?
>
> Steve.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
> For additional commands, e-mail: asp-help@perl.apache.org
>
Some extra information I forgot:

The affected pages are served from a named virtual host and I have 
$Apache::Registry::NameWithVirtualHost = 1; in the config file.

Steve.



---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Undefined Subroutine Problems

Posted by Steve Fosdick <st...@aom.bt.co.uk>.
Joshua Chamas wrote:

>Steve Fosdick wrote:
>
>>We have an application using Apache::ASP which worked fine when there
>>were just a few people using it but since user number have increased we
>>have started to get "Internal Server Error" return to clients in a few
>>odd cases and messages like:
>>
>>[Sat Nov 24 20:48:34 2001] [error] [asp] [7228] [error] Undefined
>>subroutine
>>&Apache::ASP::Compiles::_home_indigo_releases_r2_2_app_global_asa::db_seqnext
>>called at (eval 132) line 27. <--> , /usr/share/perl5/Apache/ASP.pm line
>>1471
>>
>>appearing in the error log.  This is currently with Apache::ASP 2.21
>>(debian package - the ASP.pm appears to be version 2.07).   I tried
>>Apache::ASP 2.27 and the problem was very much worse with that version
>>hence having reverted to 2.21.  So..
>>
>>1. Has anyone seen this before or know anything about what is going on.
>>
>
>Here's some guesses: 
>
>1) If you are using StatINC or StatINCMatch configs in production, this 
>could possibly contribute to this.  Try not using these configs in production.
>
>2) if you use the subroutine &db_seqnext() in your scripts, and its 
>defined in a script, and not in global.asa, this would be a problem.
>Move the definition of &db_seqnext() to global.asa, which will act
>as your perl library for your ASP application.
>
After some further correspondance with Josh off the list I think I now 
know what was going on here.

I was trying to build a site that had some modular code in it, i.e. perl 
modules that got 'use'd by the ASP pages and by other perl modules, but 
I wanted to support more than one version of both the ASP pages and the 
perl modules they depended on on the same machine, using virtual hosts.

 From this, I reasoned that if I left the perl modules to use the 
default namespace then when the module got compiled the names would be 
entered into a global.asa specific and therefore virtual host specific 
namespace and would therefore be separate from any similar named module 
in the other virtual host.

This worked in so far as the modules did get compiled into global.asa 
specfic name spaces, but it seems there is only one %INC array per perl 
interpreter and the key for this array is the module name and not the 
full path to the module name.  The upshot of this is that once one 
version of a module had been compiled in one virtual host, when the 
other virtual host came to use the module it would consult %INC and 
conclude that the module was already compiled not knowing that the 
definition from the previous compilation was not available to it.

So, I don't see a way at the moment to do what I had originally set out 
to do.  I can change the modules to each use its own namespace then the 
problem of not finding definitions would go away, but then so would any 
separation as both virtual hosts would then share the same copy of the 
module.  Hopefully this will be solved when our second machine gets built.

Steve.

Re: Undefined Subroutine Problems

Posted by Joshua Chamas <jo...@chamas.com>.
Steve Fosdick wrote:
> 
> We have an application using Apache::ASP which worked fine when there
> were just a few people using it but since user number have increased we
> have started to get "Internal Server Error" return to clients in a few
> odd cases and messages like:
> 
> [Sat Nov 24 20:48:34 2001] [error] [asp] [7228] [error] Undefined
> subroutine
> &Apache::ASP::Compiles::_home_indigo_releases_r2_2_app_global_asa::db_seqnext
> called at (eval 132) line 27. <--> , /usr/share/perl5/Apache/ASP.pm line
> 1471
> 
> appearing in the error log.  This is currently with Apache::ASP 2.21
> (debian package - the ASP.pm appears to be version 2.07).   I tried
> Apache::ASP 2.27 and the problem was very much worse with that version
> hence having reverted to 2.21.  So..
> 
> 1. Has anyone seen this before or know anything about what is going on.
> 

Here's some guesses: 

1) If you are using StatINC or StatINCMatch configs in production, this 
could possibly contribute to this.  Try not using these configs in production.

2) if you use the subroutine &db_seqnext() in your scripts, and its 
defined in a script, and not in global.asa, this would be a problem.
Move the definition of &db_seqnext() to global.asa, which will act
as your perl library for your ASP application.

> 2. Has the problem been addresses specifically in 2.29?
> 

No, this is the first that I am hearing of this, if this is due
to neither of the above.

> 3. Are then any tools or debug settings that may help gather enough
> information to debug this?
> 

Yes, set PerlSetVar Debug -1, and there will be system level tracing,
then restart your web server, and send a error_log track to me from
the web server start through the error occuring.  This would be
necessary to see what's going on if neither of the above fixes
deals with your situation correctly.  Also what would help is sending
the global.asa you are using and the script being executed 
that has the error occuring.

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org