Connection Manager Environment variables

These environment variables, set in kconf.xml, control the behaviour of the Connection Manager.

VariableLocationValuesPurpose
SERVICEA environment for a validuserName of a serviceLoad the environment for the specified service when using administration pages
BASE or SYSADDREnvironment section in a serviceA directory nameApplication's base directory
UMASKService or general sectionsOctal integer, eg 003File creation mask to emulate the umask command
WEBADMINGeneral or/and validuser/validclient ACLs"true" or "false"Enable/disable access to the administration pages
WEBSERVERGeneral or/and validuser/validclient ACLs"true" or "false"Enable/disable HTTP access to the webserver pages
KCML_NOLOGINGeneral and/or service sectionsPathname of a text file, eg $BASE/nologin.txtAlternative 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_LOCKService section onlyPathname of a text file, eg $BASE/SoapLock.txtEquivalent 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.
WWWROOTGeneral section onlySub-directory name, typically kwroot in the same directory as kwebserv itselfDefines 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.

VariableValuesPurpose
CWDA directory nameCurrent working directory, especially useful for applications which rely on relative pathnames
PSEUDOTTY"true" or "false"Enable/disable pseudo-tty support for interactive ! shell prompts
TERMvt220Useful terminal type when using the vi editor from a ! shell prompt.
EDITORviUseful command history when using the ! shell prompt from the console window.
SHELL/usr/bin/kshPathname 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.

VariableTypical Value or examplePurpose
KCMLDIR/usr/local/kcml or C:/Kerridge/KCMLInstallation directory of KCML
SERVER_NAMEHostname or IP addressDerived from the hostname used by KClient, after build 9296, or from the hostname in a HTTP URL.
SERVER_PORTinteger, typically 790Network port number that the Connection Manager is listening on.
SERVER_SOFTWAREkwebserv/06.90.00.nnnnProgram identifier and version
SERVER_TYPEDescription of host platform
SERVER_PROTOCOLHTTP/1.1Transfer protocol and version
SERVER_HTTP_URIhttp: or https:URI to construct HTTP URLs. If the Connection Manager is using a Secure Connection, the the value will be https:
PATH_INFOmyalias/cgi.kshHTTP URI, without query string
PATH_TRANSLATED/user1/app/htdocs/info/cgi.kshURI which has been translated to a file or directory on the host's filesystem
QUERY_STRINGHTTP query string, ie the part of a URL after a ? character
KMAKE_KCMLTYPE6Type of build system as specified by the kcmltype element for a service
KCML_LIBEXT.kbinThe extension for libraries built for a system of type kcmltype
KSSL_SERVER_CERT/usr/local/kcml/server.pemLocation 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_TYPEDescription
AIXIBM AIX 4.3 or later, RS6000
HPUX11HP-UX 11.00 or later
LinuxLinux, typically with GLIBC 2.2.4 or later
SolarisSun Solaris 8
WindowsMicrosoft 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&param2&param3

When the Connection Manager receives this request, the resulting environment variables will be

VariableValue
PATH_INFOmyalias/cgi.ksh
PATH_TRANSLATED/user1/app/htdocs/info/cgi.ksh
QUERY_STRINGparam1+param2+param3
SERVER_NAMEserver.domain.com
SERVER_PORT790

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
See Also:

Connection Manager
Remote Adminstration Functions