[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] CGI executables Problem
- Subject: RE: [cobalt-users] CGI executables Problem
- From: "Eric Lewis" <eric@xxxxxxxxxx>
- Date: Mon Nov 27 19:01:02 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Please disregard this note. I fixed the problem. A little HTML Snafu.
Sorry to waste BW
Eric
-----Original Message-----
From: cobalt-users-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Eric Lewis
Sent: Monday, November 27, 2000 7:34 PM
To: qube-users@xxxxxxxxxxxxxxx
Cc: Cobalt-Users@List. Cobalt. Com
Subject: [cobalt-users] CGI executables Problem
I have a question.
I have a Qube2, no modifications to Perl, or Sendmail, etc. ( I wouldn't
know how to modify them!)
So....
Why won't the following ( below the Sig ) CGI script work on my Qube?
I get this error - "The server encountered an internal error or
misconfiguration and was unable to complete your request. "
Thanks in advance for your help.
Eric R. Lewis
ErixIS
2585 Bell Road
Montgomery, AL 36117
eric@xxxxxxxxxx
www.erixis.com
My CGI Script -
#!/usr/bin/perl
#
# mail-form cgi
# © 2000 Jackie Hamilton - http://www.cgi101.com/
#
# Quick and dirty Web form processing script. Emails the data
# to the recipient.
#
# change this to the proper location of sendmail on your system:
$mailprog = '/usr/sbin/sendmail';
# change this to your email address:
$recipient = 'myname@xxxxxxxxxxxx';
# change this to your URL:
$homepage = "http://my.domain.com/";
# everything below this shouldn't need changing.
#
# Print out a content-type for HTTP/1.0 compatibility
print "Content-type:text/html\n\n";
# Get the input and grok it into something legible
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
$postinput = $buffer;
$postinput =~ s/&/\n/g;
$postinput =~ s/\+/ /g;
$postinput =~ s/%([\da-f]{1,2})/pack(C,hex($1))/eig;
# Now send mail to $recipient
open (MAIL, "|$mailprog -t") || die "Can't open $mailprog!\n";
print MAIL "To: $recipient\n";
print MAIL "From: webserver\n";
print MAIL "Subject: Generic Form Reply\n\n";
print MAIL $postinput;
print MAIL "\n\n";
print MAIL "Server protocol: $ENV{'SERVER_PROTOCOL'}\n";
print MAIL "HTTP From: $ENV{'HTTP_FROM'}\n";
print MAIL "Remote host: $ENV{'REMOTE_HOST'}\n";
print MAIL "Remote IP address: $ENV{'REMOTE_ADDR'}\n";
close (MAIL);
# Print a thank-you page
print <<EndHTML;
>html>
<head>
<Title>Thank you</Title>
</Head>
<H2>Thank you for writing!</H2>
Thank you for your feedback. Return to our
<a href="/$homepage">home page.</a><p>
EndHTML
# the end.
</body>
</html>
_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users