InnoTecSol >ICS >ICS Version: 0.7.2425 Documentation >http(x) >http cgi extension library
ICS Version: 0.7.2425
http cgi extension library

The http cgi plug-in provides the means to execute cgi scripts.

The following outlines the steps required to activate and configure the cgi extension library to execute cgi scripts.

In order to activate the http cgi plug-in the httpcgi extension library must be loaded according to extension library configuration.


<EXTLIBS>
	<LIB>httpcgi</LIB>
</EXTLIBS>
	

The cgi handler is activated according to the Host handler configuration specifying HTTPCGI for the NAME attribute.

Its configuration is introduced by the HTTPCGI tag.


<HANDLER TYPE="REQ" NAME="HTTPCGI">
   <HTTPCGI FILTERALL="NO" TIMEOUT="300">
      <SCRIPT PATTERN="*.php" EXEC="php-cgi -f"/>
   </HTTPCGI>
</HANDLER>
	

FILTERALL

The FILTERALL attribute indicates whether the handler should pass requests for which no matching file was found (404 file not found) to the default handler (FILTERALL="NO") or not (FILTERALL="YES").

If the path does not have other files than the cgi files it should be set to YES

If the script directory also contains other files (e.g. css) it should be set to NO

TIMEOUT

The TIMEOUT attribute defines the maximum runtime in seconds of a cgi script. If runtime is exceeded the script is terminated.

SCRIPT

The SCRIPT tag comprises a PATTERN attribute that specifies the patterns for which to execute the executable specified by EXEC. For security reasons the pattern should be most restrictive.

If EXEC is not specified the operating system specific execution command is used to execute the respective file.

The EXEC attribute can also contain a parameters that should be passed on to the command before the requested file path. Thus in above example the execution will be


	   php-cgi -f <requestedFile>