Connection Manager Environment variables
These environment variables, set in kconf.xml, control the behaviour of the Connection Manager.
Variable | Location | Values | Purpose |
---|---|---|---|
SERVICE | A environment for a validuser | Name of a service | Load the environment for the specified service when using administration pages |
BASE or SYSADDR | Environment section in a service | A directory name | Application's base directory |
UMASK | Service or general sections | Octal integer, eg 003 | File creation mask to emulate the umask command |
WEBADMIN | General or/and validuser/validclient ACLs | "true" or "false" | Enable/disable access to the administration pages |
WEBSERVER | General or/and validuser/validclient ACLs | "true" or "false" | Enable/disable HTTP access to the webserver pages |
KCML_NOLOGIN | General and/or service sections | Pathname of a text file, eg $BASE/nologin.txt | Alternative location for a /etc/nologin file. Used to prevent users logging in during system maintenance. Available in 6.90 (and later) versions of the Connection Manager. |
KCML_SOAP_LOCK | Service section only | Pathname of a text file, eg $BASE/SoapLock.txt | Equivalent of $KCML_NOLOGIN but for SOAP servers only. If the file exists SOAP servers will be prevented from starting. The contents of the file will be included in the HTTP reply. Available in 7.10 (and later) versions of the Connection Manager. |
WWWROOT | General section only | Sub-directory name, typically kwroot in the same directory as kwebserv itself | Defines the location of the webserver's root directory under which various resources are stored. |
These environment variables, although not used by kwebserv itself, are used by KCML or the Unix command shell, when invoked by the Connection Manager.
Variable | Values | Purpose |
---|---|---|
CWD | A directory name | Current working directory, especially useful for applications which rely on relative pathnames |
PSEUDOTTY | "true" or "false" | Enable/disable pseudo-tty support for interactive ! shell prompts |
TERM | vt220 | Useful terminal type when using the vi editor from a ! shell prompt. |
EDITOR | vi | Useful command history when using the ! shell prompt from the console window. |
SHELL | /usr/bin/ksh | Pathname of the Unix shell command interpreter. Derived from the user's account settings in /etc/passwd |
HOME | /home/fred or C:/Documents and Settings/fred | Pathname of the user's home directory, derived from the user's account settings. |
The Connection Manager will automatically set these variables which should be treated as read-only and should not set in the configuration files.
Variable | Typical Value or example | Purpose |
---|---|---|
KCMLDIR | /usr/local/kcml or C:/Kerridge/KCML | Installation directory of KCML |
SERVER_NAME | Hostname or IP address | Derived from the hostname used by KClient, after build 9296, or from the hostname in a HTTP URL. |
SERVER_PORT | integer, typically 790 | Network port number that the Connection Manager is listening on. |
SERVER_SOFTWARE | kwebserv/06.90.00.nnnn | Program identifier and version |
SERVER_TYPE | Description of host platform | |
SERVER_PROTOCOL | HTTP/1.1 | Transfer protocol and version |
SERVER_HTTP_URI | http: or https: | URI to construct HTTP URLs. If the Connection Manager is using a Secure Connection, the the value will be https: |
PATH_INFO | myalias/cgi.ksh | HTTP URI, without query string |
PATH_TRANSLATED | /user1/app/htdocs/info/cgi.ksh | URI which has been translated to a file or directory on the host's filesystem |
QUERY_STRING | HTTP query string, ie the part of a URL after a ? character | |
KMAKE_KCMLTYPE | 6 | Type of build system as specified by the kcmltype element for a service |
KCML_LIBEXT | .kbin | The extension for libraries built for a system of type kcmltype |
KSSL_SERVER_CERT | /usr/local/kcml/server.pem | Location of SSL certificate |
The value of SERVER_TYPE depends on what type of operating system the host machine is running. Currently, this can be one of the following.
Value of SERVER_TYPE | Description |
---|---|
AIX | IBM AIX 4.3 or later, RS6000 |
HPUX11 | HP-UX 11.00 or later |
Linux | Linux, typically with GLIBC 2.2.4 or later |
Solaris | Sun Solaris 8 |
Windows | Microsoft Windows NT |
The PATH_, QUERY_STRING and SERVER_ variables are provided to support a simple CGI-script interface.
A typical example:
http://server.domain.com:790/myalias/cgi.ksh?param1¶m2¶m3
When the Connection Manager receives this request, the resulting environment variables will be
Variable | Value |
---|---|
PATH_INFO | myalias/cgi.ksh |
PATH_TRANSLATED | /user1/app/htdocs/info/cgi.ksh |
QUERY_STRING | param1+param2+param3 |
SERVER_NAME | server.domain.com |
SERVER_PORT | 790 |
In addition the QUERY_STRING will also be passed as a set of command-line arguments to the CGI-script. The resulting command being:
/user1/app/htdocs/info/cgi.ksh param1 param2 param3