Solved

Perl CGI param() function not getting POST variables

Posted on 2009-07-08
3
1,819 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 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