We recently upgraded our Apache server from 1.3.12 with mod_perl 1.24 and
php 3 to 1.3.20 with mod_perl 1.25 and php4.0.5. This included an
unexpected upgrade from Perl 5.005_03 to Perl 5.6.0 since the new version
of Apache was compiled using Sun Workshop 5.0. However, since the upgrade,
I have noticed that several scripts (actually, every CGI.pm script) we used
to POST to now acts as if it is NOT being posted to. The following code
fails to return anything into @parameters despite working yesterday (before
the upgrade):
my $q = new CGI;
my @parameters = $q->param();
However, if I change the submission type from POST to GET, the script
starts functioning perfectly.
Does anyone know what would cause this type of behavior? I am at a loss as
to how to proceed ... I am including below an example script which exhibits
this behavior consistently on my server.
The server is a Solaris 7 64-bit, Sun Ultra Enterprise 250 (dual processor).
#!/usr/bin/perl -w
# This file is intended to be INCLUDED from an SHTML file,
# NOT directly executed!
use strict;
use CGI;
my $q = new CGI;
my @parameters = $q->param();
print $q->header;
# Now display the search form
print $q->start_form(-method => 'post') . $q->start_table({align => 'center'});
print "<BR>\n";
print $q->textfield(-name => 'title',
-size => 32,
-maxlength => 255);
print "<BR>\n";
print $q->submit({name => 'POST Search'});
print "<BR>\n\n";
print $q->end_form();
print $q->start_form(-method => 'get') . $q->start_table({align => 'center'});
print "<BR>\n";
print $q->textfield(-name => 'title',
-size => 32,
-maxlength => 255);
print "<BR>\n";
print $q->submit({name => 'GET Search'});
print "<BR>\n\n";
print $q->end_form();
if (@parameters)
{
foreach my $elem (@parameters)
{
print "$elem = " . $q->param($elem) . "<br>\n";
}
}
print $q->end_html();
******************************************************************************
* Anthony Brock [EMAIL PROTECTED] *
* Director of Network Services George Fox University *
******************************************************************************