Previous ION Script User's Guide: Configuring ION Script Next

Configuring ION Script for UNIX

The UNIX version of ION Script uses a shell script called .ionsrc to define various default settings, preferences, and file paths. The .ionsrc file, listed below, is installed in the ion_script directory.

Each time the ION Script parser is called, it executes the .ionsrc file. The parser first searches for the .ionsrc file in the same directory in which the parser itself, ion-p, is located (your Web server's cgi-bin directory). If the file is not found in the cgi-bin directory, it looks for the file in the ion_script directory. By copying the .ionsrc file to your Web server's cgi-bin directory, you can specify different configuration settings for each Web server running ION Script.

To configure ION Script for UNIX, do the following:

  1. If desired, copy the .ionsrc file from the ion_script directory to your Web server's cgi-bin directory. If you do this, be sure to edit only the file in the cgi-bin directory, as changes you make to the file in the ion_script directory will be ignored.
  2.  

  3. Open the .ionsrc file in a text editor.
  4.  

  5. If you didn't configure ION Script to use the path to your Web server's CGI executables directory and fully qualified domain name during the installation process, see Manually Configuring Your UNIX Web Server.
  6.  

  7. The .ionsrc file consists of a number of settings using the format option value. Refer to ION Script Configuration Options for a description of each option. Modify values in the .ionsrc file as desired. Change only the values on the right side of the = sign. Case is important — do not change the case when editing a value. The following is a listing of the .ionsrc file:
  8. # ION Script Resource File  
    #  
    # ION Script Version  
    VERSION = 6.4  
      
    # *** Images ***  
      
    # Image Width  
    Image Width = 320  
      
    # Image Height  
    Image Height = 256  
      
    # Image Label  
    Image Label = ION Image  
      
    # Link Border  
    Link Border = 1  
      
    # Direct Graphics Image Type  
    GR1 Type = PNG8  
      
    # Object Graphics Image Type  
    GR2 Type = JPEG24  
      
    # *** URLs ***  
      
    # Image Server URL  
    Image Server URL = http://hostname/cgi-bin/ion-i  
      
    # ION Script Parser URL  
    Parser URL = http://hostname/cgi-bin/ion-p  
      
    # *** Files ***  
      
    # IDL Search Path  
    IDL Path = /usr/local/ITT/ion64/ion_script  
      
    # ION Search Path  
    ION Search Path = .:$ION_DIR/ion_script/examples  
      
    # ION Temp Location  
    ION Temp Location = /tmp  
      
    # Text Extensions  
    Text Exts = txt,text  
      
    # ION Extensions  
    ION Exts = ion  
      
    # Redirect Protocols  
    Redir Protos = http  
      
    # *** Format ***  
      
    # Use <PRE> with Text Files  
    Pre Txt = t  
      
    # Default of PRE="TRUE" for <ION_DATA_OUT>  
    Pre DO = t  
      
    # Include (c) when displaying $Doc.COPYRIGHT  
    Use Copy = t  
      
    # *** Debug ***  
      
    # Location for debug log files  
    ION Debug Location = ./  
      
    # Format for ion-i log files  
    ION Debug Filename = ion-out%d.txt  
      
    # Syntax errors from ion-p can be returned to the browser.  
    # Valid options are OFF, COMMENT, or PRE  
    ION Debug Syntax = OFF  
    

Manually Configuring Your UNIX Web Server

If you skipped the "Web Server Configuration" dialog during the UNIX installation process, you will need to either execute the script_config script located in the ITT_DIR/ion64/ion_script/bin directory, or perform the following tasks manually to ensure that ION Script knows the necessary information about your Web server.

Copy the ION Script Executables

Web servers have a default directory in which CGI executables are located. This directory is often called cgi-bin. For the Apache Web Server, the path to this directory might look something like

/usr/local/apache2/cgi-bin  
  • Copy the files ion-i and ion-p from the directory ITT-DIR/ion64/ion_script/cgi-bin to your Web server's CGI executables directory. Make sure these files have execute permission for all users.
  •  

  • Copy the files ion-I and ion-P from the directory ITT-DIR/ion64/ion_script/cgi-bin/bin.platform, where platform is the name of your platform, to your Web server's CGI executables directory. Make sure these files have execute permission for all users.
  • Edit the Image Server and Parser URLs

    1. Open the file ITT-DIR/ion64/ion_script/.ionsrc in a text editor. This is the ION Script configuration file. If multiple Web servers will be using the same ION Script installation, copy .ionsrc to your Web server's CGI executables directory and modify the file in that location.
    2.  

    3. Edit the Image Server URL and ION Script Parser URL entries so they contain the fully qualified domain name of your Web server, and the correct path to your Web server's CGI executables directory. For example, the Image Server URL might look like the following:
    4. http://myhost.mydomain.com/cgi-bin/ion-i  
      

       

    5. Save the .ionsrc file.

      IDL Online Help (March 06, 2007)