iTP Secure WebServer System Administrators Guide (Version 7.5+)
You controlerror logging by specifying an ErrorLog or ExtendedLog directive in the server
configuration file (httpd.config). For further details about enabling error logging, see “Managing
Log Files” (page 108).
CGIStandard File Environment
Although the UNIX and OSS environment have some internal differences, your CGI programs can
use a standard file environment in familiar ways. This section provides background about the
underlying differences and the ways your CGI programs can use the standard file environment.
In the NCSA CGI model, interprocess communications are achieved through the standard in
(stdin) and standard out (stdout) file descriptors. Each of these file descriptors is a simplex
communications channel. Full-duplex, bidirectional interprocess communications are achieved only
when both file descriptors are open simultaneously.
The Guardian $RECEIVE interprocess communications model contrasts with the POSIX model in
that it is a half-duplex, message-based mechanism. The CGI interfaces of the iTP Secure WebServer
simulate full-duplex stream behavior by treating all received messages as the standard input stream,
and all reply messages as the standard output stream.
Standard Input
The httpd process acts as the standard input file for CGI applications. The httpd process passes
all request data following the HTTP header to the generic-CGI program on the standard input file
of the program. A Pathway CGI application receives request data on a simulated standard input
file accessible through the CGI library.
Standard Output
The httpd process serves as the standard output file for CGI applications. The httpd process
returns all response information from the CGI program to the requester.
Standard Error
The CGI library functions provide access to the standard error file.
Customizing the Standard File Environment
You can use the Stdin,Stdout, and Stderr options to the Server directive to customize the
standard file environment for your CGI program.
For a Pathway CGI application, the CGI library procedures always use the httpd process in place
of standard files, but the application can use the corresponding C or other language library functions
(for example, printf) for access to the files specified by Stdin, Stdout, and Stderr. For
example, the SSC uses the standard output and error files you specify for error reporting.
CGI Library
A CGI program to be invoked by the generic-CGI server class uses standard functions, such as C
library functions, for access to the standard file environment.
A Pathway CGI application uses the CGI library for access to standard files. “CGI Procedures”
(page 159) lists and describes the procedures in the CGI library.
Table 21 CGI Procedures
DescriptionProcedure
This procedure decodes the name/value pairs encoded in
form data returned by the POST request method or in the
CGI_Capture()
QUERY_STRING returned by the GET request method,
creates an environment variable for each name/value pair
CGIStandard File Environment 159










