bobbybobbertson
Programmer
I'm using a linux server.
I wrote a feedback form in html and i have it call a cgi script for processing. It is not working and I would like to debug it.
Is there a way to run the cgi from the command line on the unix machine and pass the parameters as though they came from the html document.
here is my cgi script:
###############################
###############################
#!/usr/bin/perl -w
use strict;
use CGI;
my $cgi = new CGI;
open OUTPUT_FILE, "> output.txt" or die "died";
foreach my $input_paramter ($cgi->param()) {
print OUTPUT_FILE "$input_paramter == $cgi->param($input_parameter)\n"
}
###############################
###############################
If I try and run this script from the command line, I get the following prompt:
(offline mode: enter name=value pairs on standard input)
I am then able to enter paramters, but I can't end it. It goes on forever!!! How do I tell it that I'm done entering paramters???
escape doesn't work...<ctrl>C kills the program...a blank line does nothing.
I wrote a feedback form in html and i have it call a cgi script for processing. It is not working and I would like to debug it.
Is there a way to run the cgi from the command line on the unix machine and pass the parameters as though they came from the html document.
here is my cgi script:
###############################
###############################
#!/usr/bin/perl -w
use strict;
use CGI;
my $cgi = new CGI;
open OUTPUT_FILE, "> output.txt" or die "died";
foreach my $input_paramter ($cgi->param()) {
print OUTPUT_FILE "$input_paramter == $cgi->param($input_parameter)\n"
}
###############################
###############################
If I try and run this script from the command line, I get the following prompt:
(offline mode: enter name=value pairs on standard input)
I am then able to enter paramters, but I can't end it. It goes on forever!!! How do I tell it that I'm done entering paramters???
escape doesn't work...<ctrl>C kills the program...a blank line does nothing.