cormanaz has asked for the wisdom of the Perl Monks concerning the following question:
Bros, I have a problem here that's got me flummoxed. CGI seems not to be returning a parameter that the log says is being passed. Here's the code:
use CGI; my $q = new CGI; my $function = $q->param('f'); my $id = $q->param('id'); my $table = $q->param('table'); my $coder = $q->param('coder'); if ($function eq 'load') { loaddoc($id,$table,$coder,$data); } if ($function eq 'mark') { my $h = $q->param('h'); my $t = $q->param('t'); my $junk; ($junk,my $headsent,my $headword) = split(/[sw]/,$h); ($junk,my $tailsent,my $tailword) = split(/[sw]/,$t); warn "h: $h t: $t hs: $headsent hw: $headword ts: $tailsent tw: $ +tailword"; . . . }
I am running this on Apache and it has been intermittently returning null for the h parameter, which is why I put the warn in there. So here is what the warn statement writes into the server log:
So as you can see the h=s39w9 parameter is getting passed to the script but mod CGI is not picking it up somehow. The other odd thing is that sometimes it works fine. What could explain this?!?[Sat Mar 21 13:15:36 2009] [error] [client 127.0.0.1] h: t: s43w29 h +s: hw: ts: 43 tw: 29 at C:/xampplite/cgi-bin/unitize.pl line 31., r +eferer: http://localhost/cgi-bin/unitize.pl?f=mark&id=659&coder=1&tab +le=test&h=s39w9&t=s39w25
TIA.......Steve
UPDATE: I got the param list from CGI with $q->param and listed them in the warn, and they are all there, including h.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI Not Returning Parameter that's there
by linuxer (Curate) on Mar 21, 2009 at 21:10 UTC | |
by GrandFather (Saint) on Mar 21, 2009 at 22:40 UTC | |
by cormanaz (Deacon) on Mar 21, 2009 at 22:32 UTC | |
by linuxer (Curate) on Mar 21, 2009 at 22:57 UTC | |
Re: CGI Not Returning Parameter that's there
by olus (Curate) on Mar 22, 2009 at 01:46 UTC | |
by cormanaz (Deacon) on Mar 22, 2009 at 14:40 UTC | |
Re: CGI Not Returning Parameter that's there
by ruzam (Curate) on Mar 22, 2009 at 04:24 UTC | |
Re: CGI Not Returning Parameter that's there
by Anonymous Monk on Mar 22, 2009 at 06:29 UTC | |
Re: CGI Not Returning Parameter that's there
by hangon (Deacon) on Mar 22, 2009 at 18:33 UTC |
Back to
Seekers of Perl Wisdom