Running Perl CGI from Windows

From: Jan Eden (lists_at_jan-eden.de)
Date: 01/30/04


Date: Fri, 30 Jan 2004 20:01:22 +0100
To: Perl Lists <beginners@perl.org>

Hi all,

I hope this is not too off-topic, since I hesitate to subscribe to yet another list...

I wrote a very simple CGI script to read data from an HTML form like this:

my $q = new CGI;

my $name = $q->param('name');
my $message = $q->param('message');
my $email = $q->param('email');

Later, the script opens a pipe to sendmail and prints a message into the pipe. It works fine when I tested it on my machine (Mac OS X). So far, so good.

But accessing the script from a Windows machine gives me the prepared error message. From the log I can see that all parameter values end up in the $name variable, along with the names of the second and third parameter. So the value of $name is:

John Doe email=john@doe.com message=This is the message

Note that the first parameter's name does not appear.

I suspect the problem has to do with line endings (\r vs \n), but I cannot figure out at which point of the process line endings could matter.

Any ideas?

TIA,

Jan

-- 
There are 10 kinds of people:  those who understand binary, and those who don't


Relevant Pages

  • Re: ssi and Perl/CGI
    ... How do I go about passing variables to the script via include virtual ... I'll give cmd a whirl, though cgi seems to work great if all my page ... content is coming from the CGI script. ...
    (perl.beginners)
  • Re: CGI Question
    ... leftframe.cgi, not javascript. ... > a CGI script (and it's initially called with NO ... > and the right frame contains an HTML file. ...
    (perl.beginners)
  • Re: Slightly OT: Incoming email triggers
    ... > I found a provider who offers Tcl as a scripting language - great ... > - a script gets activated ... The phrase you're looking for is "mail delivery agent," and the question ... you could always .htaccess protect a CGI script that you run which is a ...
    (comp.lang.tcl)
  • Re: perl/cgi exploit with bracketed module names passed in as CGI param
    ... > cgi script prints the raw cgi param value back out, ... which allows to evaluate a string inside of brackets, ... you put your CGI-parameters into a string and run that string through ...
    (comp.lang.perl.misc)
  • Re: root privileges from cgi script?
    ... I require for a staff member to be able to initiate a backup script ... > a chain of backup processes. ... > I would welcome any suggestions on how to do two things from a CGI script; ... > I know suex can't be used because ROOT is specifically not allowed. ...
    (comp.unix.shell)