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
  Accounts
  FAQs
Instruction
    Tutorials
    Short Courses
    TA Resources
About Lab
    Facilities
    Support Staff
    Policies



Search
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:
    http://www.ischool.utexas.edu/cgi-bin/cgiwrap/coder/script.cgi
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:
    http://www.ischool.utexas.edu/cgi-bin/cgiwrapd/coder/script.cgi
To summarize, the URL of a CGI script using CGI Wrap is:

    http://SERVER/cgi-bin/cgiwrap/USER/SCRIPT

Evaluate this tutorial here.

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

Created by broot@ischool.utexas.edu
Last updated 1/20/98