http://www.perlmonks.org?node_id=313396

Murcia has asked for the wisdom of the Perl Monks concerning the following question:

Hi confreres,

I have a strange problem. I habe two servers running.   One with perl 5.8.0, one with 5.8.1   On both servers I run the same scripts (same CGI-version 2.93) but one script causes that the browser does not end.   The same script runs well under 5.8.0!   But maybe this is a apache problem?   In one server I use apache 1.3.23 (perl 5.8.0) in the other apache2?????????

... my $sortValue; my $sort = $cgi->param('sort'); print "Value: \$cgi->param('sort')", $cgi->param('sort'); $sortValue = $sort - 1; ### here is the problem in 5.8.1 exit; ### does not exit!

any hints?

Murcia

janitored by ybiC: Retitle from "cgi param", Format cleanup for legibility and to remove *evil* <pre> tags

Replies are listed 'Best First'.
Re: CGI process exit not noticed by browser
by Aristotle (Chancellor) on Dec 09, 2003 at 12:54 UTC
    Can you check that the Perl process is still running?It might an Apache issue or something else instead. Or is maybe one of the servers configured to use mod_perl? I could imagine this is a buffering issue, do you change the $| variable in your script somewhere?

    Makeshifts last the longest.

      I deinstalled apache2 installed apache 1.3. and now it works! Thanks Murcia
Re: CGI process exit not noticed by browser
by barrd (Canon) on Dec 09, 2003 at 12:40 UTC
    Hi Murcia,
    Are you certain you know what value is in $sort? Also what is the point in assigning a value for $sortValue if the next step is only to exit (unless there's more to the script)?

    So, first off double check that what is 'actually' contained in $cgi->param('sort') is what you think it is before trying to manipulate it.

    Update:I didn't read the question properly after a second look and Aristotle is far more likely to be correct esp if you are using mod_perl and trying to exit... sorry :(