common gateway interface
The Common Gateway Interface (CGI) is a standard that's used to interface
external programs with the web server. Using CGI scripts, input
can be taken from a web page and passed to a program, processed
in some way, and then passed back to the web server to be displayed.
The most common examples of CGI applications perform searching
or add/remove entries from a database. Have you ever used a search
engine at a web site or made an entry into an online address book?
If so, chances are that you've used a CGI script.
CGI scripts have their problems, though. Because they process every
request in real-time, an extra workload is introduced onto the server.
More importantly, poorly written code can also lead to security
holes. Common programming errors could give an attacker access
to all of your files, and possibly allow you to change them! For this
reason, Mallorn Computing asks to review each script before it is
used.
CGI scripts are generally written in either C or Perl, although Python,
Fortran, and any other language is allowable. C is considered more
secure and significantly faster, but is harder to implement. Perl
is generally the language of choice because of its simplicity some very complicated functionality
has already been programmed and provided to the user, whereas C
is a much lower level language (you have to do it all yourself).
Other sources of information on CGI:
- An introductory
tutorial from NCSA, creators of the World Wide Web.
- CGI Made Really
Easy. Another tutorial, but for people who already know how to
program.
- Yahoo!'s listing of
CGI scripts and resources.
Please send mail to
support@mallorn.com with any questions that you may have.
|