CGI PROGRAMMING
Introduction
“CGI” stands for “Common Gateway Interface.” CGI is the method by which a web server can obtain data from (or send data to) databases, documents, and other programs, and present that data to viewers via the web. More simply, CGI is programming for the web. A CGI can be written in any programming language. Perl has become a popular choice for CGI programming because it is available for all platforms, and it has many useful tools that are ideal for the web. CGI programs can be used to enhance your web page by counting hits and storing and retrieving guestbook information among other things.
This page assumes a certain level of knowledge and may seem cryptic to the layman. Please note that SoVerNet cannot provide support in the writing, maintenance or running of your CGI scripts. We have provided you the space to implement these scripts on your web pages but can not instruct you in the writing of your scripts nor troubleshoot such scripts if they do not work.
Excellent CGI tutorials, geared to beginners can be found at:
http://www.cgi101.com/class and The Mining Company HTML & CGI tutorials http://html.miningco.com
Basically what a CGI script written in Perl does is:
Before doing anything else there are 2 prerequisites:
Some good references include:
How do I make my CGIs work on SoVerNet?
SoVerNet’s webhosting service runs Apache on BSDI which is a flavor of UNIX. Read carefully the following, it should solve 95% of your problems:
Finally, you need an FTP (file transfer protocol) client to transfer your HTML pages and Perl scripts to the server.
Password Protected Directories
(NOTE—If you are using FrontPage Extensions, you should NOT use this utility or use this methodology to set up Password Protected Directories. There are methods within FrontPage for accomplishing this.)
Also see our step-by-step instructions for more regarding what is noted below:
I.E. user foo would put the authorization file named userauth into
their base directory /home/f/o/foo In this example "f" is the
first letter of your username and “o” is the second
letter of your username. So if your username were “xmas” the
directory you would specify would be: home/x/m/xmas.
We understand that this is complicated and have a utility that you can place into your CGI directory to help you with the maintenance of authorized users to a restricted directory. See the section below on configuring the access.cgi script
AuthType Basic
AuthName "Access into the directory foo"
AuthUserFile /home/f/o/foo/userauth
require valid-user
Configuring the access.cgi script
|