Frequently Asked Questions on using CGI programs in IOHK's World Wide Web Server: (Version 2)

written by Ashley Cheng, June 1997


Content:

  1. What is new in this version?
  2. What is covered in this FAQ?
  3. What is NOT covered in this FAQ?
  4. What is CGI?
  5. What constitutes a CGI program?
  6. Which CGI programs/scripts are available in IOHK's Web Server and how to make use of them in my home-page?
  7. Can I execute a script/program placed in my own home-directory from a Web Page?
  8. Then will I be able to make use of my own CGI scripts or programs in IOHK's Web Server?
  9. Where can I find more information about CGI?
  10. Who is Ashley Cheng??


1. What is new in this version?

Information on how to create an image map is updated as IOHK re-configures its Web Server setup.

Back to content


1. What is covered in this FAQ?

The main purpose of this document is to introduce members of Internet Online Hong Kong Limited (IOHK) to the Common Gateway Interface (CGI) and to show them how they could make use of some of the CGI scripts and programs currently installed in IOHK's when they write their own home-pages.

Back to content


2. What is NOT covered in this FAQ?

Basic knowledge on HTML is assumed and this document does not tell you how to write a CGI script or program. For more information on CGI programming please refer to the documents and sites listed in the reference section.

Back to content


3. What is CGI?

CGI stands for Common-Gateway-Interface. It is a standard specifying how external programs interface with information servers such as a Web Server. It tells the Web Server which and how programs are invoked and how output of the executed programs are pass back to the Web Server. An ordinary HTML document is static and doesn't change. A CGI program, on the other hand, is executed in real-time, so that it can output dynamic information (which could be an HTML document itself or something that an HTML document may refer to e.g. an image file, a statistic file) and interact with users' input.

Some cool things that can be done with CGI programs include on-line database searching, feedback form, image-map, access counter and on-line ordering.

Back to content


4. What constitutes a CGI program?

A CGI program could be written in any language that allows it to be executed in the system concerned. IOHK's Web server is running on a Unix operating system and you could use a programming language like C or a scripting language such as PERL or any Unix Shells.

I personally prefer PERL for several reasons: it is a scripting language which needs no compilation before it will run and is easier to debug and maintain than a compiled program; it is optimized for easy manipulation of text, files and processes; it is portable and available in most platforms.

Back to content


5. Which CGI programs/scripts are available in IOHK's Web Server and how to make use of them in my home-page?

Back to content


6. Can I execute a script/program placed in my own home-directory from a Web Page?

No. Technically it is possible but for security reasons, IOHK's Web server is so configured that only scripts/programs located in a specific directory (which happens to be /cgi-bin in our case) could be launched from a Web Page.

Back to content


7. Then will I be able to make use of my own CGI scripts or programs in IOHK's Web Server?

Yes, you may. You are welcomed to submit CGI scripts/programs, that you think are useful, to the Webmaster of IOHK's Web Server for scrutinization. Our WebMaster will consider implementing the requested scripts/programs in IOHK's cgi-bin directory as long as they satisfy the following criteria:

Back to content


8. Where can I find more information about CGI?

Back to content


9. Who is Ashley Cheng?

Who cares?!

This question is included for completeness sake. If you do wish to find out more about the author of this FAQ, take a look at his home-page. You may also bug him with questions on CGI or other Web-authoring related questions by email.

Back to content