You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ron Pero <rp...@boone.net> on 2000/08/19 19:06:26 UTC

Strange "exit" error

Am running
In PerlRun
$ENV{MOD_PERL} = mod_perl/1.21
This is perl, version 5.005_03 built for i386-freebsd
It is on iserver, which has a virtual root system
Am also running dbi.

When the script calls "exit", it produces an error:
 at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 366.
 
line 366 is the line that contains "exit".
There is no descriptive clue as to what the error is.

This does not happen while running the script in cgi mode.

I've looked in the mod_perl guide, and tried different ways of exiting
(Apache::exit, etc), but same thing. And besides, exit should work just
fine under PerlRun.

Can anyone clue me in as to what this very cryptic error is?

Thank you.

Ron

Re: Strange "exit" error

Posted by Doug MacEachern <do...@covalent.net>.
On Sat, 19 Aug 2000, Ron Pero wrote:

> Am running
> In PerlRun
> $ENV{MOD_PERL} = mod_perl/1.21
> This is perl, version 5.005_03 built for i386-freebsd
> It is on iserver, which has a virtual root system
> Am also running dbi.
> 
> When the script calls "exit", it produces an error:
>  at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 366.
>  
> line 366 is the line that contains "exit".
> There is no descriptive clue as to what the error is.
> 
> This does not happen while running the script in cgi mode.
> 
> I've looked in the mod_perl guide, and tried different ways of exiting
> (Apache::exit, etc), but same thing. And besides, exit should work just
> fine under PerlRun.
> 
> Can anyone clue me in as to what this very cryptic error is?

it's been explained a few times in the past, i don't feel like doing it
again or searching the docs/archives.  in short, calling exit() is bad,
avoid it.  Apache::exit overrides the builtin exit() to prevent some
of the badness, but in a way that can be tripped up leading to that
warning message.  it is only a warning, if you want to get rid of it,
don't use exit().


Re: Strange "exit" error

Posted by Stas Bekman <st...@stason.org>.
On Sat, 19 Aug 2000, Ron Pero wrote:

> Am running
> In PerlRun
> $ENV{MOD_PERL} = mod_perl/1.21
> This is perl, version 5.005_03 built for i386-freebsd
> It is on iserver, which has a virtual root system
> Am also running dbi.
> 
> When the script calls "exit", it produces an error:
>  at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 366.
>  
> line 366 is the line that contains "exit".
> There is no descriptive clue as to what the error is.
> 
> This does not happen while running the script in cgi mode.

It's quite possible that you get a wrong line report, therefore you get
confused by looking at the wrong place. See:
http://thingy.kcilink.com/modperlguide/debug/Finding_the_Line_Which_Triggered.html

Also try to add:

use Carp;
SIG{__DIE__} = \&Carp::carp;
SIG{__WARN__} = \&Carp::cluck;

To get a full stack trace

> I've looked in the mod_perl guide, and tried different ways of exiting
> (Apache::exit, etc), but same thing. And besides, exit should work just
> fine under PerlRun.
> 
> Can anyone clue me in as to what this very cryptic error is?
> 
> Thank you.
> 
> Ron
> 



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org