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:

Shawn, one thing I recommend is not using that old cgi-lib.pl and use the
CGI.pm library that now comes standard with every Perl distribution.  It
abstracts a lot of HTML elements so you can treat them as widgets like you
would programming a GUI.

There are a lot of things that can go wrong with a cgi script that may not
necessarily indicate an error in your code.  Here's a checklist you should
use whenever a CGI script fails in this manner, and is also good
information to provide someone else if you are asking for help:

* What do the web server logs say?

* What web server are you using?

* Does the CGI script have execute rights?

* Does the directory the CGI script lives in have permission to execute
  scripts via the server configuration?

* Does the user & group you are running the web server under (i.e.,
  nobody:nobody) have permission to execute the script in question or
  trying to write something where it doesn't have permission?

* What happens if you run it from the command-line?  CGI.pm scripts can be
run from the command line, and you can pass POST variables to it.

* Does the Perl script use -w and 'use strict' to help in diagnosing
  errors?

* Is the #! line at the top of the script actually pointing to the correct
  path for the Perl interpreter?

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Unix is a Registered Bell of AT&T Trademark Laboratories.
                -- Donn Seeley




Reply via email to