RE: Undefined subroutine error (only now and then)

2000-09-28 Thread Michael

> > The subroutine is there (it executes in the first time). If I keep 
> > trying to reload the page, sometimes it works, sometimes it doesn't.
> > The same error happens to other scripts, with different subroutines 
> > being called, but never happens if I run them from the command line
> > (with the scripts slightly modified).
> > 

If you run the server as single server mode

/usr/local/apache/bin/httpd -X

you should get the error every time the script runs. The reason you 
don't see it often is that you hit a new child which loads a fresh 
version and will not produce the error until the second load attempt. 

I never satisfactorialy solved the problem except to remove all 
subroutines from the parent script and put them in a "require" 
document. Since the require resources are only compiled once, the 
problem goes away.
[EMAIL PROTECTED]



RE: Undefined subroutine error (only now and then)

2000-09-28 Thread Geoffrey Young



> -Original Message-
> From: Paulo Narciso Filho [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 28, 2000 12:23 PM
> To: [EMAIL PROTECTED]
> Subject: Undefined subroutine error (only now and then)
> 
> 
> I'm using Apache and mod_perl to develop a dynamic web site. When I 
> execute a specific script for the first time (after restarting 
> Apache, for instance), it always works. If I reload the page, I
> (sometimes) get the following message in my apache error log:
> 
> [error] Undefined subroutine &Apache::ROOTagv_2eembra
> co::perl::agvs::agvs_2ecgi::GetUser called at (file_location) line 
> 19,  chunk 35.

I think this is related to Apache::StatINC - I've seen it now and again when
using StatINC, and IIRC it has been reported by others on the list...

StatINC is only really for development anyway - you may want to check out
Apache::Reload as a StatINC substitute if it's really bothersome.

HTH

--Geoff

> 
> The subroutine is there (it executes in the first time). If I keep 
> trying to reload the page, sometimes it works, sometimes it doesn't.
> The same error happens to other scripts, with different subroutines 
> being called, but never happens if I run them from the command line
> (with the scripts slightly modified).
> 
> some things from the server configuration:
> 
> PerlInitHandler Apache::StatINC
> 
> 
> SetHandler perl-script
> PerlHandler Apache::Registry
> Options ExecCGI
> allow from all
> PerlSendHeader on
> 
> 
> Can anyone help?
> Thanx
> 
> Paulo
>