logo
 

CGI Scripts

 

NOTE: This document assumes that you already know CGI, and how to use it with HTML. So if you do not understand CGI scripts you should visit NCSA's Information page, and for help implementing it through HTML, you might want to check out this Interactive Guide to HTML and CGI Scripts.
  1. You must create a directory in your public_html directory called "cgi-bin" and set its permissions with chmod to 755.

    Example:

    eclipse:[/home2/jdoe] cd public_html
    eclipse:[/home2/jdoe/public_html] mkdir cgi-bin
    eclipse:[/home2/jdoe/public_html] chmod 755 cgi-bin
  2. Then, put your CGI scripts in that directory, and assign each script the permissions to 755.

  3. If your script is a Perl script, then the first line in your Perl script should read:

    #!/usr/local/bin/perl -

    To call your cgi-bin script from HTML, you must use CGIWRAP. The syntax of CGIWRAP is:

    http://www.qis.net/cgi-bin/cgiwrap/username/script

    So, if your username is "jdoe" (as in the example above) and you have a CGI called "myscript", you would call your script like this:

    http://www.qis.net/cgi-bin/cgiwrap/jdoe/myscript

    One nice feature of CGIWRAP is the ability to easily debug your script. CGIWRAP can output environment variables and error messages if your script is not working correctly. To put CGIWRAP into debug mode, just add a "d" to the end of the CGIWRAP filename, like so:

    http://www.qis.net/cgi-bin/cgiwrapd/jdoe/myscript

    All questions regarding CGI-BIN and CGIWRAP should be directed to help@qis.net

 
Use of Quantum's services, systems, servers, and facilities, constitutes the customer's agreement with Quantum's Rules and Regulations, and the Quantum Service Agreement, both of which are subject to change without notice.
 
Home |  Site Map |  Support |  Contact Us