School of InformationSkip to content
Home About GSLIS Academic Programs Courses People & Groups Research & Publications Computing Resources Career Services
Tutorials > Web Development > How to Use CGI Wrap
Row of computers
  Computing Resources
  Equipment Reservation
    Short Courses
    TA Resources
About Lab
    Support Staff

Site Map
Contact Info
UT Home
In order to run CGI scripts on the School of Information server, you will need to use a program called CGI Wrap. CGI Wrap is a program which allows users to execute CGI content while maintaining security for the server. The following instructions assume that you have a knowledge of CGI programming and HTML.

The first thing you need to do to use CGI Wrap is create a directory under your public_html directory. In order to do this, move into your public_html directory and create a cgi-bin directory. From your home directory, type:
    cd public_html
    mkdir cgi-bin

Now, you need to make your cgi-bin directory executable by the world. Type:
    chmod 711 cgi-bin
Now, you can either create CGI scripts in this cgi-bin directory, or copy scripts you've written elsewhere into your cgi-bin directory.

When you are creating HTML forms that reference your CGI scripts (or you are using CGI scripts that aren't called from a form), you have to use a special path that calls CGI Wrap and tells it where to find your script. So if your username is coder, and you've created a script named script.cgi, you would place the following URL into the action attribute of an HTML form tag:
One of the benefits of using CGI Wrap is that it has a special debugging mode that gives you lots of information on your script and prints out as plaintext what it is sending to the server. In order to use the debugging mode, you call cgiwrapd instead of cgiwrap (notice the d on the end). Thus, your action attribute would now look like:
To summarize, the URL of a CGI script using CGI Wrap is:


Evaluate this tutorial here.

If you have any questions concerning CGI Wrap, send mail to the IT Lab staff

Created by
Last updated 1/20/98