OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:26 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: CGI Script Problems
PostPosted: Tue Dec 03, 2002 9:21 pm 
Hey guys,

I downloaded this script and was trying to run it on my website, the problem is that I keep getting Internal Server Errors and the tech support guys say it is not the server, so I was wondering if anyone here could see a problem.

Code:
#!/usr/bin/perl

# $Header: /cys/people/brenner/http/docs/web/RCS/simple-form.cgi,v 1.4 1996/03/29 22:07:56 brenner Exp $
# Copyright (C) 1994 Steven E. Brenner
# This is a small demonstration script to demonstrate the use of
# the cgi-lib.pl library

require "cgi-lib.pl";

MAIN:
{

  # Read in all the variables set by the form
  &ReadParse(*input);

  # Print the header
  print &PrintHeader;
  print &HtmlTop ("cgi-lib.pl demo form output");

  # Do some processing, and print some output
  ($text = $input{'text'}) =~ s/\n/\n<BR>/g;
                                   # add <BR>'s after carriage returns
                                   # to multline input, since HTML does not
                                   # preserve line breaks

  print <<ENDOFTEXT;

You, $input{'name'}, whose favorite color is $input{'color'} are on a
quest which is $input{'quest'}, and are looking for the weight of an
$input{'swallow'} swallow.  And this is what you have to say for
yourself:<P> $text<P>

ENDOFTEXT


  # If you want, just print out a list of all of the variables.
  print "<HR>And here is a list of the variables you entered...<P>";
  print &PrintVariables(*input);

  # Close the document cleanly.
  print &HtmlBot;
}


Just as a note, the location of PERL up the top there is definately correct, but as for the rest, well, hope you can help...

thanks.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group