[ back to toc ]

getting CGI to work

Date: 2002/04/09 17:09

Q:
Hi,

Got a copy of a BigNose FormScript (BNBFORM form processing script. I
changed all the necessary variables. I remained the script convert.cgi.
I then put the script on our server and it was given full read, write and
execute permissions.
the form is on http://www.infm.ulst.ac.uk/~chris/fran1.htm

I get an error page.

Changed the code to the proper server (OOPS sorry) but I still get an
internal error.
I have moved a copy of convert.cgi to the web which can be accessed on
http://www.infm.ulst.ac.uk/~chris/convert.cgi
As a newbie any help would be truly welcome.
MMM

The form is a online survey and i need the data for my Phd.

any help would be welcome
MMM

A:
The html page points to the URL

http://www.sandbox.ulst.ac.uk/~chris/cgi-bin/convert.cgi

and my client browser says that this server is not existent. Maybe you
mistyped the name of the server.

In my trial the script is not even started as the client does not find the
server.

regards,
Peter
Q:
A:
The Internal Server Error message comes from Apache. This error comes from
some more basic mis-settings than that of how the sendmail path is set.
Ensure that the script is uploaded into the proper directory and that the
web server user (usually called www-data) has permission to execute that
script. Also ensure that the very fist line of the script contains

#! /usr/bin/perl

or try

#! /usr/local/bin/perl

and also ensure that the perl interpreter is there where the first line of
the code tells it to you, and is executable by www-data (or whatever user
the web server is executing).

If that does not help ensure that the first thing your program prints is

Status:200
Content-Type: text/html

and an empty line following these. You can check it starting the program
from the command line. If this still does not help then you can look at
(if you can) the Apache error log file. There is usually some more
information regarding the error.

Regards,
Peter

[ back to toc ]