University of Vermont

UVM Self-help Web Guide

Using CGI Scripts

CGI or Perl scripts are often used on Web sites to perform server functions, such as processing forms or creating Web guest books. These scripts are executable programs usually written in Perl (although you may use C, C+, FORTRAN, etc.). Many Web programmers freely distribute pre-made scripts on the Web that can perform various functions. In addition, users can devise their own scripts from scratch to use on their Web sites.

Because of security concerns, scripts can only be run from a specially designated server. ETS maintains a dedicated scripts server where you can upload your scripts. You will need to create a folder on this server and make an alias from your account to that folder.

Step One: Make the CGI Directory

mkdir /.../uvm.edu/fs/webdev/cgi-bin/$USER

Step Two: Link to the CGI Directory

ln -s /.../uvm.edu/fs/webdev/cgi-bin/$USER ~/cgi

Step Three: Set permissions on this new folder

chmod 755 ~/cgi

Step Four: Upload Your Scripts

Upload your scripts to the CGI directory via the link you have created in your account. Remember to set correct permissions (including execute) on your scripts.

Step Five: Call the Script from Your Web Page

http://cgi.uvm.edu/cgi-bin/your-user-name/script-name

Many CGI scripts are available on the Web for download. This scripts require little or no customization to perform many common Web functions. Here are some of the most popular repositories of these scripts:

Last modified December 05 2011 10:09 AM