Solved

Perl CGI param() function not getting POST variables

Posted on 2009-07-08
3
1,803 Views
Last Modified: 2013-12-25
I am trying to port a huge amount of code to my laptop for testing.  The live system and test systems are Perl 5.8.7 on IIS.  Until an hour ago it was going well and I could read POST variables.  I changed nothing in the configuration.  Now I cannot read POST variables using param().  This is very weird.  

I have simplified the code below.  On my live system, when I click "POST working", I see "SUBMIT: POST working".  On the test system I see only "SUBMIT:".  If I click the "GET working" button on either, I see "SUBMIT: GET working".

Any ideas?  Unfortunately, I cannot change the param() to use something like $q->param(), etc., as there are hundreds of files...
use CGI qw(:standard);
 
 
print "Content-type:text/html\n\n";
 
print "SUBMIT: ". param('submit');
 
print<<EOF;
 
<form method="POST" action="test.pl">
				POST FORM
<input type="submit" name="submit" value="POST working">
</form>
 
 
<form method="GET" action="test.pl">
				GET FORM
<input type="submit" name="submit" value="GET working">
</form>
 
EOF

Open in new window

0
Comment
Question by:glassgiant
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 24807394
I don't see anything with the code that looks wrong.  What web browser are you using?  Can you try a different web browser.  Can you try shutting down, and restarting the web server?  Or rebooting the machine?
0
 
LVL 1

Author Comment

by:glassgiant
ID: 24807674
GAHR!  I tried in Firefox (was using IE) and it worked.  I shut down IE and restarted it.  Now it's working!
0
 
LVL 1

Author Closing Comment

by:glassgiant
ID: 31601284
Thanks for the quick response.  I usually tell users to restart when weirdness happens.  I should have taken my own advice...
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question