Creating and registering CGI scripts

A CGI is a server-resident program that provides a standard way of adding dynamic content to a website by allowing external gateway programs to interface with information servers such as web servers. Create the CGI script that you want to make available as a tool for your users and then register the script on the Web GUI server. You can create a CGI script in any programming language.

Before you begin

If any required resources, for example, Perl, are installed in nonstandard locations, ensure that the paths to the resources in any CGI scripts are correct.

Procedure

  1. Create the CGI script. Ensure that the script is executable and has appropriate file permissions. Then, save it on the server in WEBGUI_HOME/etc/cgi-bin.
  2. Save the CGI script on the Web GUI server in WEBGUI_HOME/etc/cgi-bin .
  3. Click Administration > Event Management Tools > CGI Registry.
  4. Click Register. Then, in the Register CGI window, use the following fields and buttons to register the CGI script:
    Name
    Type a name for the CGI script. This does not have to be the same as the file name of the CGI script.
    By default, the following characters may not be used in names:
    $ ! £ % ^ & * ( ) + = ¬ ` ~ # @ ' : ; < > { } [ ] ? / \ \ | , "
    By default, the following characters may not be used as the initial character of names:
    / \ \ * ? " < > | & .
    These invalid characters are defined in the following file: WEBGUI_HOME/etc/illegalChar.prop
    Use Smartpage commands
    Select this check box if the output of the CGI script is HTML data that contains SmartPage commands.
    File name
    Type the file name of the script in the text field. It is not necessary to include the path.
    Groups for this CGI
    If you want to restrict access to the CGI script, click Groups and select the groups to which you want to allow access. The default group is *, where all users have access.
  5. Click Save.
    For Windows operating systemNote: On Windows platforms, the content of the <omnibus_webgui>\etc\cgi\cgi.group file must be modified to use double slashes \\, rather than \, before upgrade to fix pack 7 or later. For more information, see http://www-01.ibm.com/support/docview.wss?uid=swg21987786.

What to do next

Define the tool that you want to execute the CGI script.