On 9/26/01 12:05 PM, "Mr. CRJ. Clarke" <[EMAIL PROTECTED]> wrote:

> I am having diffuculties running a unix command with variables obtained
> from a submitted via a web cgi script.
> the command is /gspq $var1 $var2
> $var1 and $var2 are obtained from a web and can be displayed but I
> cannot send these vaiable to a unix program resident on my server.
> using the command $result = `/gspq $var1 $var2`;
> I noticed that If I assign the values just before running the command
> withthe following :
> $var1 = "testvalue1";
> $var2 = "testvalue2";
> this works but I can not use values that I obtained from  the web. I
> fget th folowing error:
> Premature end of script header
> 


Change you script thus:

#!perl -w  # or whatever line you use for your server.

 use strict;
 use diagnostics;

 use CGI qw(:all);
 use CGI::Carp qw/fatalsToBrowser/;

# Then the rest of your CGI...


That *should* display the error in your browser...

PS - What you are wanting/trying to do is *extremely* dangerous to the
system you are running such a script on...


HTH;
-Sx- 
__________________________________________________________________
"I know you believe you understand what you think I said, but I am
not sure you realize that what you heard is not what I meant."
  :::  Richard Nixon



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to