Hmm, can you reproduce the same problem with a simple test script and send
it to the list?
> I don't want to take up your time with my problems, so if I can't get this
> going under mod_perl I'll revert to cgi (it's not really a high volume site
> -- yet).
>
> Get the same result with Apache::exit.
> at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 351.
> at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
>
> Then at the line just before the exit, I added: die("now dieing");
>
> Here is what appears in the error log. Could the mysterious error be due to
> something going on in PerlRun.pm. It looks like it -- but I'm not
> knowledgeable about the internals of PerlRun. And why is the error called
> twice? Does it have anything to do with requiring in an external script?
>
> Thanks again for your help. But unless this is definitely a mod_perl
> problem, rather than a problem in my code or understanding, I'm not going
> to bother you with it any more.
>
> Ron (see error log entries below)
> ------------------------------------------
> WHEN RUN FROM THE COMMAND LINE
> myscript% virtual ./myscript.cgi
> now dieing at ./myscript.cgi line 355.
> main::goto_page('/index.html') called at ./myscript.cgi line 253
> now dieing at ./myscript.cgi line 355.
> main::goto_page('/index.html') called at ./myscript.cgi line 253
> myscript%
> ------------------------------------------
> WHEN RUN FROM THE BROWSER, WITH DATA INPUTS
> now dieing at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 355.
> at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
> now dieing at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 355.
> at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
> at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
> [Sat Aug 19 12:09:18 2000] [error] PerlRun: `now dieing at
> /usr/local/etc/httpd/cgi-bin/myscript.cgi line 355.
> at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
> at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
> '
> -----------------------------------------------
>
>
> At 07:41 PM 08/19/00 +0200, you wrote:
> >On Sat, 19 Aug 2000, Ron Pero wrote:
> >
> >> Dear Stas
> >>
> >> Thank you very much for your reply!
> >
> >What happens if you run the script from the command line?
> >
> >What happens if you replace exit with Apache::exit? or some other
> >statement, like
> >
> >print("hello "),die"dieing...";
> >
> >> It is the exit line -- I isolated that with print statements.
> >>
> >> Could a "require" cause a problem? Main script requires another script; the
> >> other script calls a subroutine in the main script, which calls the exit.
> >>
> >> I added the carp lines you suggested. Now it does not die. But the warning
> >> gives me this:
> >>
> >> at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 353.
> >> #RP: The above is the exit line.
> >> at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
> >> Carp::carp(' at /usr/local/etc/httpd/cgi-bin/myscript.cgi line
> >> 353.^J') called at /usr/local/etc/httpd/cgi-bin/myscript.cgi line 242
> >> #RJP The above is where a script gets "require"ed. See below
> >> eval 'package Apache::ROOT::cgi_2drun::myscript_2ecgi;use Apache
> >> qw(exit);
> >> #line 1 /usr/local/etc/httpd/cgi-bin/myscript.cgi
> >> #!/usr/local/bin/perl
> >> # <> /usr/local/etc/httpd/htdocs\\myscript.cgi
> >> my $cf_host_name = \'\';
> >>
> >> #RP: the entire script gets output to the error log here, but not the
> >> script that gets required.
> >>
> >> ;' called at /usr/local/lib/site_perl/Apache/PerlRun.pm line 118
> >> Apache::PerlRun::compile('Apache::PerlRun=HASH(0x821c4e4)',
> >> 'SCALAR(0x8241ab8)') called at /usr/local/lib/site_perl/Apache/PerlRun.pm
> >> line 280
> >> Apache::PerlRun::handler('Apache=SCALAR(0x81c15b0)') called at
> >> /usr/local/etc/httpd/cgi-bin/ic_login.cgi line 0
> >> eval {...} called at /usr/local/etc/httpd/cgi-bin/ic_login.cgi
> line 0
> >>
> >> Thanks again!
> >>
> >> Ron
> >> At 07:06 PM 08/19/00 +0200, you wrote:
> >> >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_Trigger
> >> ed.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:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com
> >> >http://singlesheaven.com http://perlmonth.com perl.org apache.org
> >> >
> >> >
> >> >
> >>
> >
> >
> >
> >_____________________________________________________________________
> >Stas Bekman JAm_pH -- Just Another mod_perl Hacker
> >http://stason.org/ mod_perl Guide http://perl.apache.org/guide
> >mailto:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com
> >http://singlesheaven.com http://perlmonth.com perl.org apache.org
> >
> >
> >
>
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com perl.org apache.org