Setting Configuration Parameters . . Setting Client Variables . . Encrypting User Passwords . . Customizing Error Messages . . Related Topics . . Home


Configuring Applications

The following sections describe how to:

Setting Configuration File Parameters

The wcconfig.std file consists of variable name/value pairs that act as configuration parameters. Variable names and their values are separated by white space. Blank lines and any text following a number sign ( # ) are ignored.

To modify the configuration file:

  1. Back up the existing wcconfig.std configuration file.
  2. Edit the wcconfig.std file using either the Universal Web Connect Administration Tool or the Service Manager.
  3. Specify global values for parameters by setting values preceding any application sections (identified by the APP and ENDAPP delimiters).
  4. Specify parameters between the APP and ENDAPP delimiters to override global values by setting values that apply only to a particular application. Within the APP and ENDAPP settings, you can specify values specific to a particular application. Place these application-specific parameters following the global parameters. Include the application name following the APP parameter. The following example shows an application section:

    APP myapp.exe
    MI_WEBTIMEOUT
    300
    MI_WEBMAXSESSIONS 10
    MI_WEBDRIVER
    Y
    MI_WEBBINDIR
    $INFORMIXDIR\src\myapp
    ENDAPP

    You cannot set MI_WEBLOCKFILE, MI_WEBLOGFILE, MI_WEBLOGMAXSIZE, MI_WEBSHMBASE, MI_WEBSHMKEY, or MI_WEBTCPPORT at the application level.

  5. To implement the changes, stop and restart Universal Web Connect in the Administration Tool or the Service Manager.

Click for a complete list of configuration file parameters. Following is an example of a configuration file.


# Universal Web Connect interprets environment variables preceded by a dollar sign 
# On UNIX, the dollar sign ( $ ) is not interpreted, and full paths must be specified.

MI_WEBSHMKEY	       0xAA                     # Unique identifier for shared memory segment
MI_WEBSHMBASE       0x8000000                # Base address to attach to shared memory

MI_WEBLOCKFILE      $INFORMIXDIR\log\wc.lock # Full path to lock file
MI_WEBLOGFILE	    $INFORMIXDIR\log\wc.log  # Full path to log file

MI_WEBIPCHECKING    Y                        # Check client IP addresses

MI_WEBLOGMAXSIZE    200000                   # Maximum log file size in bytes

MI_WEBMAXSESSIONS   15                       # Maximum sessions active at any time
MI_WEBTIMEOUT	    600                      # Session timeout value in seconds

MI_WEBDRIVER        Y                        # Y for managed connect 
                                             # N for direct connect
MI_WEBTCPPORT	    8000                     # Starting TCP Port number for direct connect
                                             # If 0,use port dynamically assigned by 
                                             # operating system

MI_WEBBINDIR	       $INFORMIXDIR\bin         # Universal Web Connect applications reside here
MI_WEBWORKDIR	    $INFORMIXDIR\bin         # Current working directory for applications
MI_WEBUPLOADDIR     d:\temp                  # Files are placed here for client upload	  

APP wcdaemon.exe
MI_WEBBINDIR	       $INFORMIXDIR\src\daemon\debug
MI_WEBWORKDIR	    $INFORMIXDIR\src\daemon
MI_DATABASE         app_pages@ol_pcfoo       # dbName@serverName
MI_USER             informix		             # database user
MI_PASSWORD         informix                 # database user password
MItab               webPages                            
MIcol               object	                             
MInam               ID                                  
MIval               apb
MItabObj            webImages
MIcolObj            object
MInamObj            ID
MItypeObj           image/gif  
                       	       
ENDAPP

Setting Client Variables

Because application processes are initiated by the Universal Web Connect service, they do not have access to the operating system environment, unless you create a shell script wrapper around your application to set client variables and invoke this script from your Web browser.

Alternatively, you can pass client variables to application processes by specifying the variable name and value in the wcconfig.std configuration file. This enables you to set client environment variables to be accessed within your applications, including Informix product variables such as DBDATE and DB_LOCALE.

You can set up to five client variables in the global section of the configuration file and up to five client variables for each application section in the configuration file. Variables specified in the global section of the configuration file apply to all the application sections. A dot ( . ) immediately preceding the variable name indicates that the variable is passed to the application processes. For example, the following wcconfig.std contains client variables that are set in the global section and in the application section:

# other global configuration parameters
.MYGLOBAL_ENV1           globalEnvValue1
.MYGLOBAL_ENV2           globalEnvValue2
.MYGLOBAL_ENV3           globalEnvValue3
.MYGLOBAL_ENV4           globalEnvValue4

APP wcdaemon
# other configuration parameters
.MYENV1           ThisIsValueofMyEnv1
.MYENV2           ThisIsValueofMyEnv2
ENDAPP
 
APP myapp
# other configuration parameters
ENDAPP

The application-specific client variables MYENV1 and MYENV2, with the values ThisIsValueofMyEnv1 and ThisIsValueofMyEnv2, respectively, apply to the wcdaemon application processes only. The global client variables, MYGLOBAL_ENV1 through MYGLOBAL_ENV4, apply to all applications. Therefore, a total of six client variables are set for the wcdaemon application processes. Only the four global variables are set for the myapp application processes.

Encrypting User Passwords

Informix Dynamic Server requires that a client database connection satisfy one of the following conditions:

For example, if you have created your webdb database as the webuser user, your wcconfig.std file contains the following values:

MI_DATABASE         webdb@dbweb_server
MI_USER             webuser

If the Web server has been configured to run as the webuser user, you do not need to specify a password in the wcconfig.std file. However, if the Web server runs as nobody (as is often the case), or as any user other than webuser, you must specify a password for webuser in the wcconfig.std file:

MI_DATABASE          webdb@dbweb_server
MI_USER              webuser
MI_PASSWORD          webuserpassword

If you supply the password in the wcconfig.std file, you should be aware of the permissions set on this file.

Alternatively, you can use the webpwcrypt encryption program to store the password in a format that only Universal Web Connect can decrypt and send to the database. The webpwcrypt program, located in $INFORMIXDIR/bin, takes three arguments and requires you to enter the password for the user accessing the database (the password is not echoed):

Syntax: webpwcrypt database@db_server user key

database@dbserver Name of the database and server being accessed
user Name of the user accessing the database
key User-supplied string used in the encryption process (can be any string)

The following command encrypts the webuser password with the user-supplied string uwc:

webpwcrypt webdb@dbweb_server webuser uwc

The webpwcrypt program prompts you for the user password:

Enter password for user 'webuser': <enter webuserpassword> 
Enter password again: <re-enter webuserpassword>

The webpwcrypt program returns:

MI_PASSWORD          8ec626b05906f5c3c21408c0217efd4f 
MI_PASSWORD_KEY      uwc

Copy the preceding variables and values into the wcconfig.std file:

APP wcdaemon
# other parameters for this application 
MI_DATABASE          webdb@dbweb_server 
MI_USER              webuser
MI_PASSWORD          8ec626b05906f5c3c21408c0217efd4f 
MI_PASSWORD_KEY      uwc
ENDAPP

For the decryption to work correctly, you must specify all of the parameters to the encryption program exactly as they are specified in the wcconfig.std file. If the values for MI_DATABASE, MI_USER, MI_PASSWORD_KEY, or the user password change, you must rerun the webpwcrypt program to obtain a new value for MI_PASSWORD.

The password you enter for database access during installation is encrypted by the installation script using the default key value uwc, and these values are written to the wcconfig.std file.

The password to access the Universal Web Connect Administration Tool is not encrypted because you do not need to use an operating system user name to access the administration tool.

Customizing Error Messages

Universal Web Connect provides standard error messages, stored in the $INFORMIXDIR/uwc-msg/uwcerror.std file, to display when an error occurs. This file is read-only and must not be modified.

You can customize Universal Web Connect error messages to localize messages to a language other than English or display a message other than the standard error message when an error occurs.

Setting the Error Message File

If you want to localize or otherwise customize error messages, set the MI_WEBERRORFILE configuration file parameter to the name of the file that contains information about how the error messages should be displayed. The file is retrieved from the $INFORMIXDIR/uwc-msg directory unless you specify a complete path to the file. In the following sample wcconfig.std configuration file, the wcdaemon application retrieves error messages from the uwcerror1.msg file, located in the $INFORMIXDIR/uwc-msg directory:

APP wcdaemon
# other configuration parameters
MI_WEBERRORFILE      uwcerror1.msg
ENDAPP

Include the complete path and filename of the error message file if the file is located in a directory other than $INFORMIXDIR/uwc-msg. In the following sample wcconfig.std file, the myapp application retrieves error messages from the /myapp/myapp.msg file:

APP myapp
# other configuration parameters
MI_WEBERRORFILE      /myapp/myapp.msg
ENDAPP

If MI_WEBERRORFILE is not set, or is set to a file that cannot be read, the standard error messages are displayed.

Creating Customized Error Messages

Within the customized error message file, you can specify two types of error handling:

Include only the errors you want to customize in your error message file. Errors that are not included in this error message file are retrieved from the standard uwcerror.std error message file. The customized error message file contains the three following tab-separated fields:

Error Symbol

Type of Replacement

Replacement Text or Page Name

ERROR_SYMBOL T if text; P if page If type of replacement is T , include text in quotes.
If type of replacement is P , include the filename for the HTML error page in quotes. The file is retrieved from the $INFORMIXDIR/uwc-msg directory unless you specify the complete path and page name of the HTML file. The file can contain additional error information, a link to the page that restarts the application, or other information.

Following is an example of a customized error message file.


ERR_NOAPP           T      "Sorry, the application you specified does not exist, please try
again" 
ERR_BADSESSION      P      "badsession.html"


Set MI_WEBERRORFILE to the filename of your customized error file. For the preceding customized error file, if the ERR_NOAPP error occurs, the text Sorry, the application you specified does not exist, please try again is sent to the Web browser, using the standard HTML template. If the ERR_BADSESSION error occurs, the badsession.html page is sent to the Web browser. Since no other error symbols are specified in this file, messages from the standard error message file are returned if any other error occurs.

Related Topics

Configuration File Parameters


Top of Page . . Setting Configuration Parameters . . Setting Client Variables . . Encrypting User Passwords . . Customizing Error Messages . . Home