BC Logo
  .    BCINFO    .    Personal Web Server    .   Phone/Email Directory    .   Find BC   .    Agora    .
. BCINFO / Web Master's Corner  
Search
 
  BCINFO
. Web Operations
    Welcome
    Visitor Status
    Search Engine
    CGI
  --Counter Example
  --Contact Form Example
    FTP
    Development Tools
  IT
  WWW
 
 
  

Webmaster's Corner

  
 

What is CGI (Common Gateway Interface)?

The Common Gateway Interface (CGI) is a method that allows you to run programs on a webserver. All web servers allow you to create CGI programs but may use different technologies to implement them.

CGI is the way you make a form do something, like send someone an email, search a database or fill in a guestbook. CGI programs have to be written in a language the web server understands. At BC, CGI's are typically written in C or perl, the most common scripting language.

If you have written a CGI program in C, you will need to work with the webmaster to compile it on the webserver.

If you have written a perl script you just need to:

  • reference the location of Perl on the server,
    #!/usr/local/bin/perl
  • Use your FTP client to make your script executable
  • always end the perl script in .cgi.

Note: You do not need to access a centrally located cgi-bin directory on the web server. You can create your own directory in your work area to contain your CGI scripts.

 

FYI

For more information on creating CGI scripts, we recommend these sites:
  
   [ Contact : Technical Credits : Top of Page ]
This version: http://www.bc.edu/webops/cgi.html
Copyright © 1997-2000 The Trustees of Boston College.