language-icon Old Web
English
Sign In

Common Gateway Interface

In computing, Common Gateway Interface (CGI) offers a standard protocol for web servers to execute programs that execute like console applications (also called command-line interface programs) running on a server that generates web pages dynamically. Such programs are known as CGI scripts or simply as CGIs. The specifics of how the script is executed by the server are determined by the server. In the common case, a CGI script executes at the time a request is made and generates HTML. In computing, Common Gateway Interface (CGI) offers a standard protocol for web servers to execute programs that execute like console applications (also called command-line interface programs) running on a server that generates web pages dynamically. Such programs are known as CGI scripts or simply as CGIs. The specifics of how the script is executed by the server are determined by the server. In the common case, a CGI script executes at the time a request is made and generates HTML. In brief, an HTTP POST request from the client will send the HTML form data to the CGI program via standard input. Other data, such as URL paths, and HTTP header data, are presented as process environment variables. In 1993 the National Center for Supercomputing Applications (NCSA) team wrote the specification for calling command line executables on the www-talk mailing list. The other Web server developers adopted it, and it has been a standard for Web servers ever since. A work group chaired by Ken Coar started in November 1997 to get the NCSA definition of CGI more formally defined. This work resulted in RFC 3875, which specified CGI Version 1.1. Specifically mentioned in the RFC are the following contributors: Historically CGI scripts were often written using the C language. RFC 3875 'The Common Gateway Interface (CGI)' partially defines CGI using C, as in saying that environment variables 'are accessed by the C library routine getenv() or variable environ'.

[ "Web server" ]
Parent Topic
Child Topic
    No Parent Topic