Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
July 15, 2006, 7:18 am
rate this thread
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
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
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
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
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