Overview
OECGI4.EXE is the OpenEngine Common Gateway Interface version 4. You use OECGI4.EXE as the connection to your OpenInsight application from a web server. Introduced in OpenInsight v10, OECGI4 offers improvements over OECGI3.EXE and OECGI2.EXE, including failover, load balancing, and greater security.
OECGI4.EXE is backwards-compatible with OECGI3.EXE; that is, if no specific registry entries are found for OECGI4.EXE, it will use the OECGI3.EXE registry settings if they exist. Therefore, OECGI4.EXE can directly replace OECGI3.EXE without requiring any additional configuration changes.
Users should upgrade from OECGI3.EXE to OECGI4.EXE since OECGI4.EXE (in conjunction with OpenInsight v10) provides enhanced functionality (especially concerning REST operations) and improved stability and performance.
This quick start guide will discuss the following:
a) Installing OECGI4 on your web server.
b) Uploading files via OECGI4
c) Configuring multiple connection settings
d) Configuring failover & load balancing settings
This document assumes that you have previously set up the OEngineServer service and that it is running. Typically the EngineServer is installed as a service and not run manually. To install as a service you can double click on the InstallApp-NT.bat file located in the OESERVER folder within your OpenInsight directory. The EngineServer requires the Java Runtime Environment which can be downloaded from Oracle at:
https://www.java.com/en/download/manual.jsp
For Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Sever 2008, Windows Server 2012 and Windows Sever 2016 64-bit operating systems, please make sure that you install the 64-bit version of the Java Runtime Environment.
Installing OECGI4 on your web server
If the web server is installed on the same server as OpenInsight, there is no need to copy the OECGI4 files. However, if the web server is different than the OpenInsight server, you must copy the O4W folder from your OpenInsight directory to the web server.
Configuring the default settings for OECGI4
OECGI4 is configured using Windows registry settings. The registry settings are applied to the computer you are using as your web server and where OECGI4.EXE is installed. You can create the required settings simply by double clicking on the OECGI4.REG file found in \RevSoft\OInsight10\O4W. OECGI4.REG will create the default settings at the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Revsoft\OECGI4
If you prefer, you can create the registry settings manually by editing the Windows registry. To open the registry editor click on the Start button, then select Run, then type regedit.exe. Then navigate to the above registry key. (See the OpenInsight help files for more details about the OECGI4 registry settings.)
See figure 1 below for the default registry settings.
The following page contains a list of all the possible OECGI4 registry settings and explains their use.
Setting | Type | Description |
---|---|---|
ApplicationName | String | The OpenInsight application/database that should be opened. This value should be entered in uppercase. Example: SYSPROG |
EngineName | String | The name of the OEngine to start. By specifying an engine name, multiple processes may access the same engine. (Use for debugging.) You usually leave this blank |
FileMode | String | The mode used to upload files to OpenInsight. Valid values are: 1 = upload file to the directory specified in FilePath, and delete it when the OECGI4 request is completed. 2 = upload file to the directory specified in FilePath 3 = upload the file directly to OpenInsight. See the “Uploading Files via OECGI“ section for more details. |
FilePath | String | The directory where the file will be uploaded for modes 1 & 2. This path is relative to the directory where OECGI4.EXE is located. See the “Uploading Files via OECGI“ section for more details. |
MultipleServers | String | Determines how failover and load balancing features will operate if multiple ServerURL’s and ServerPort’s are entered. Valid values are: 0 = Failover mode. 1 = Load balancing mode See “Configuring Failover & Load Balancing” section below for more information. |
OILocation | String | Optional, default value “”, otherwise the directory where OpenInsight’s executables (specifically, REVCAPI.DLL) resides. If specified, this asks OECGI4 to first change to the specified directory before trying to communicate with the OpenEngine. This allows a single engine server to communicate with multiple different OpenInsight instances. Note that the Engine Server configuration file (eserver.cfg) must explicitly allow for this directory to be used, via the OILocations parameter. |
AdditionalValues | String | Optional, default value “”, otherwise a comma-separated list of HTML header values to return. If specified, OECGI4 will retrieve the specified values from the environment and pass them into OpenInsight after the RegistrySettings$ field (field 26) of the request string. For example, specifying HTTP_ACCEPT_LANGUAGE will add the allowed language from the browser into the request string, if supported by the web server and browser. |
ProcedureName | String | The name of the Basic+ procedure to call. The OECGI4.reg program will set this to use RUN_OECGI_REQUEST. It is possible to create your own procedure to listen to OECGI requests. This should be entered in uppercase Example: RUN_OECGI_REQUEST |
ServerPort | String | The TCP/IP port that the OEngineServer/OESocketserver is listening on. The OECGI4.reg program will set this value to 18088. The ServerPort setting corresponds to the ServerPort setting in the eServer.cfg file. If either the Registry setting or config file setting is changed the other should be changed also. Example: 18088 Multiple serverPort’s can be entered comma delimited. See “Configuring Failover & Load Balancing” section below for more information. |
ServerURL | String | The IP address where the OEngineServer/OESocketserver is listening. The OECGI4.reg program will set this value to localhost. You can specify a: • Computer name (myserver) • domainname (https://www.mydomain.com) • TCP/IP address (192.168.10.10) Multiple ServerURL’s can be entered comma delimited. See “Configuring Failover & Load Balancing” section below for more information. |
ShutdownFlags | String | Optional, default value “1”, otherwise a number stored as a string (for example, “1”). |
StartupFlags | String | Optional, default value “65”, otherwise a number stored as a string (for example, “1”). The startup flags and shutdown flags are passed into the OpenEngine and control how the engine should be started and shut down. The default value for the startup flags (“65”) instructs the OpenEngine to always create a new engine, invisibly; the default value for the shutdown flags (“1”) instructs the OpenEngine to always shut down the engine when finished. When debugging, it is sometimes useful to set the startup flags to “1”, which instructs the OpenEngine to always create a new engine, visibly, on the desktop. The other useful value for StartupFlags is “0” (open an existing, already running OEngine); the other useful value for ShutdownFlags is “0” (do NOT close the OEngine when processing terminates). |
SysDownPage | String | The path and name of an html page to display when OECGI4 cannot connect to the server specified in ServerPort and ServerURL. This path is relative to root of your web site. Example: \sysdownpage.htm will be located in the root directory of your web site. |
UserName | String | The OpenInsight user name to log in as. This should be entered in uppercase. Example: SYSPROG |
UserPassword | String | The OpenInsight user password to log in as. |
Table 1 - OECGI4 registry settings