Solved

Perl CGI param() function not getting POST variables

Posted on 2009-07-08
3
1,791 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to count occurrences of each item in an array.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now