CGI.pm/modperl2 and intermittent missing POST data

CGI.pm/modperl2 and intermittent missing POST data

am 15.07.2006 09:18:32 von lobo_nz

After upgrading to Apache2 with modperl2 I have found that a CGI script
I have used without any trouble for years has develped the annoying
problem of intermittently returning to the initial page.
As far as I can figure out the POST data is not getting to the script.

The problem is intermittent and sometimes takes 10 minutes of using the
script to get the anomaly, I say anomaly as there is no error messages
in the Web server log and the perl script executes without error simply
providing the login screen as no POST data gets through, refreshing the
browser once or twice will result in the POST data making it to the
script.

After allot of googling there seems to be a quite few 'missing POST
data' results, some are related to older CGI.pm modules, however I have
the very latest CGI.pm 3.20 , installed to try and fix the problem with
no luck, other results vaguely mentioned CGI.pm and modperl2 not
playing nicely like this article
http://aspn.activestate.com/ASPN/Mail/Message/modperl/187181 0
which says "something is funky with the way that CGI.pm is initialising
itself under mod_perl" which isnt much help.

There seems to be no definitive answer or fix for this, so far my
choices are:
Hopefully someone can help me out otherwise I am going to have to
downgrade my server and/or rewite allot of code.

Re: CGI.pm/modperl2 and intermittent missing POST data

am 16.07.2006 10:24:55 von lobo_nz

Well, I removed mod-perl2 and reverted the mod-perl scripts to CGI and
all works great, I still want to know what is going on with CGI.pm and
mod_perl2 :\

Re: CGI.pm/modperl2 and intermittent missing POST data

am 26.07.2006 14:56:48 von tom

lobo_nz wrote:
> Well, I removed mod-perl2 and reverted the mod-perl scripts to CGI and
> all works great, I still want to know what is going on with CGI.pm and
> mod_perl2 :\

Nine times out of ten this is caused by the CGI script remembering
variables from a previous session, since mod_perl keeps the CGI program
in memory and the script no longer initialized between calls. Standard
mod_perl technique requires that you always turn on strict pragma (use
strict; ) and develop with warnings pragma (use warnings;).

Good information on porting CGI to mod_perl is under
http://perl.apache.org/docs/1.0/guide/porting.html

Tom