[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Problem with CGI Script on a Qube 2
- Subject: Re: [cobalt-users] Problem with CGI Script on a Qube 2
- From: "Worldwide Beauty Store Staff" <email@xxxxxxxxxxxxxxxxx>
- Date: Wed Aug 9 10:59:49 2000
- Organization: Worldwide Beauty Store, LLC
Hi Steven -
Telnet or ssh into the shell and at the command line enter the following
command:
Perl -c your.cgi
Then press enter key. "your.cgi" should be the nam of your cgi script.
This will outline specific syntax errors in the script and will pinpoint
them by the exact line number. I hope that this helps you.
-Max
----- Original Message -----
From: "Stephen Sloan" <ssloan@xxxxxxxxxxxxx>
To: "Qube Users" <qube-users@xxxxxxxxxxxxxxx>; "Cobalt List"
<cobalt-users@xxxxxxxxxxxxxxx>
Sent: Wednesday, August 09, 2000 10:17 AM
Subject: [cobalt-users] Problem with CGI Script on a Qube 2
> This is probably a pretty basic question but since I'm feeling like I'm in
> idiot mode here goes:
>
> I'm getting the following error message when trying to execute a CGI Perl
> script:
>
> "CGIWrap encountered an error while attempting to execute this script:
>
> Error Message: No such file or directory
> Error Number: 2
> This message usually indicates there is a problem with the script itself.
> The owner of the script needs to check the #! line for correctness."
>
> Here is the script:
>
> #!/usr/bin/perl
>
> $tomail = "ssloan@xxxxxxxxxxxxx";
> $location = "http://www.mincocorp.com/thanks.htm";
>
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> # Split the name-value pairs
> @pairs = split(/&/, $buffer);
> foreach $pair (@pairs) {
> local($name, $value) = split(/=/, $pair);
> $value =~ tr/+/ /;
> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> # strip off any possible SSI comment tags.
> $value =~ s/<!--(.|\n)*-->//g;
> $in{$name} = $value;
> }
>
> open (MAIL,"|/usr/sbin/sendmail -t -n -oi") ||
> die "there was a problem with the call to sendmail";
>
> print MAIL "To: $tomail\n";
> print MAIL "From: $in{'name'} <$in{'email'}>\n";
> print MAIL "Reply-To: $in{'email'}\n";
> print MAIL "Subject: $in{'subj'} (from Website)\n\n";
>
> print MAIL $in{'body'};
>
> close(MAIL);
> print "Location: $location\n\n";
>
>
> I'm calling the script from http://www.mincocorp.com/email.htm
>
> I'd appreciate any help.
>
> TIA
>
> Stephen Sloan
> MINCO Corporation
> http://www.mincocorp.com
> Comprehensive Real Estate Services
>
>
>
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>