Hi Shawn,

  The internal server error is usually because, the unix server 
  can't get the perl.exe to parse the .pl script. This is mostly caused
  by editing on  Windows Client and FTP'ing up to a Unix machine.

  Try working on a Linux box ... and moving the files up from there.
  It's just that touchy ...

regards

SunDog
======================================================

At 10:52 AM 5/4/01 -0500, you wrote:
>I am trying to append to an existing database and my cgi keeps coming up
>with an Internal Server Error. I've looked this over many times with
>different books as references, and I can't see what is wrong with it. My
>form method is POST. Here is my code:
>
>#!/usr/bin/perl
>require("cgi-lib.pl");
>print "Content-type: text/html\n\n";
>unless(open(DAT, ">>timesheet.db")){
>       die, "Cannot Open File: timesheet.db" };
>print " \n"; >print "\n"; >print "\n"; >$nothing = ' '; >$choose = 'CHOOSE
ONE'; >read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); >@pairs = split(/&/,
$buffer); >foreach $pair (@pairs) { > ($name, $value) = split(/=/, $pair); >
$value =~ tr/+/ /; > $value =~ s/^\s+//; > $value =~
s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; > $FORM{$name} = $value; >}
>$name = uc $FORM{'name'}; >$date = uc $FORM{'date'}; >$job = uc $FORM{'job'};
>$customer = uc $FORM{'customer'}; >$task = uc $FORM{'task'}; >$service = uc
$FORM{'service'}; >$hours = uc $FORM{'hours'}; >$desc = uc $FORM{'desc'}; >if
($name == $choose or $date == $nothing or $job == $nothing or $customer >==
$nothing or $task == $nothing or $service == $choose or $hours == >$nothing or
$desc == $nothing) { >print "Please make sure ALL field are filled in.\n";
>print "BACK\n"; >print "
\n";
>       close DAT;
>       exit; }
>else {
>       print "Timesheet for $name on $date written to file successfully.\n";
>       print "</body> 
\n";
>       print DAT "$name,$date,$job,$customer,$task,$service,$hours,$desc\n";
>}
>close DAT;
>exit(0);
>
>If anybody has any ideas, I'd appreciate the help.
>
>Thanks,
>
>Shawn
>

Reply via email to