This site was designed to help users of the University of Minnesota's
web services. More precisely, it is here to provide help with CGI (Common
Gateway Interface) scripts. CGI is used for a wide variety of World Wide
Web applications. Some popular uses include counters, guestbooks, loggers,
and form submissions.
How do I access a CGI script over the Web?
The URL (Uniform Resource Locator), often called location, you must
use to access the CGI scripts saved in your "cgi-bin" directory is as
follows:
http://www.tc.umn.edu/cgi-bin/do?user=YourInternetID&prog=ScriptFileName
where:
YourInternetID is your internet ID, and
ScriptFileName is the name of your CGI script file.
As you may have guessed, you can access a CGI script from within a web
page with the <A HREF="ScriptURL"> tag (a link).
However, currently you cannot use
Server-Side Includes with our server. Many CGI scripts require special
environment variables, set by the web server upon script execution,
in order to run.
Back to FAQ list
What do I do about a "Server Error"?
This is the most popular of errors you will encounter using cgi. What
it means is that the script either won't run, or it won't send the information
to your web browser correctly. To see which senario is the case, try running
the script in the UNIX environment.
To do this, log into your account using Telnet. That is, telnet to the
host: YourInternetID.email.umn.edu. (Where YourInternetID
is your University internet ID.) If you are using a Menu Shell, typing
a "!" will get you to the UNIX shell. Once in the shell you need
to change your working directory to the cgi-bin directory (enter
cd cgi-bin). Once in that directory, you can check the syntax of
your script by typing perl -c ScriptFileName. Where
ScriptFileName
is the name of your script. If the syntax is correct, try running the script
directly in the shell. To do this simply type the script's name at the
prompt. This should print out the HTML file that the script produces.
If this output is wrong and you wish to try to configure the script to
run correctly anyway, you can try to edit it.
HINT: To edit the script at the shell, you can use the Pico text editor
by typing pico ScriptFileName
Back to FAQ list