iTP Secure WebServer System Administrator's Guide (Version 7.0)
Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide—523346-012
8-29
Logging Error Information
Logging Error Information
You use a CGI program’s standard error to log error information. Any output written to
standard error is recorded in either or both of two places:
•
The ErrorLog file
•
The stderr field in the ExtendedLog file
Standard errors from a server CGI program are not returned to the Web.
You control error 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 on page 7-23.
CGI Standard 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.