A report on Common Gateway Interface

The official CGI logo from the spec announcement

Interface specification that enables web servers to execute an external program, typically to process user requests.

- Common Gateway Interface
The official CGI logo from the spec announcement

16 related topics with Alpha

Overall

PC clients communicating via network with a web server serving static content only.

Web server

6 links

Computer software and underlying hardware that accepts requests via HTTP or its secure variant HTTPS.

Computer software and underlying hardware that accepts requests via HTTP or its secure variant HTTPS.

PC clients communicating via network with a web server serving static content only.
The inside and front of a Dell PowerEdge server, a computer designed to be mounted in a rack mount environment. It is often used as a web server.
Multiple web servers may be used for a high traffic website.
Web server farm with thousands of web servers used for super-high traffic websites.
ADSL modem running an embedded web server serving dynamic web pages used for modem configuration.
First web proposal (1989) evaluated as "vague but exciting..."
The world's first web server, a NeXT Computer workstation with Ethernet, 1990. The case label reads: "This machine is a server. DO NOT POWER IT DOWN!!"
Sun's Cobalt Qube 3 – a computer server appliance (2002, discontinued)
PC clients connected to a web server via Internet
PC clients communicating via network with a web server serving static and dynamic content.
Directory listing dynamically generated by a web server.
Chart:
Market share of all sites for most popular web servers 2005–2021
Chart:
Market share of all sites for most popular web servers 1995–2005

At the beginning of 1994, the most notable among new web servers was NCSA httpd which ran on a variety of Unix-based OSs and could serve dynamically generated content by implementing the HTTP method and the CGI to communicate with external programs.

PHP

6 links

General-purpose scripting language geared toward web development.

General-purpose scripting language geared toward web development.

This is an example of PHP code for the WordPress content management system.
The elePHPant, PHP mascot
A "Hello World" application in PHP 7.4 running on its built-in development server
Example output of the phpinfo function in PHP 7.1
A broad overview of the LAMP software bundle, displayed here together with Squid
Dynamic web page: example of server-side scripting (PHP and MySQL)

PHP code is usually processed on a web server by a PHP interpreter implemented as a module, a daemon or as a Common Gateway Interface (CGI) executable.

Apache HTTP Server

5 links

Free and open-source cross-platform web server software, released under the terms of Apache License 2.0.

Free and open-source cross-platform web server software, released under the terms of Apache License 2.0.

CGI support

Perl

2 links

Family of two high-level, general-purpose, interpreted, dynamic programming languages.

Family of two high-level, general-purpose, interpreted, dynamic programming languages.

The Camel symbol used by O'Reilly Media
The onion logo used by The Perl Foundation
Alternative Perl 5 Logo
Camelia, the logo for the Perl 6 project

Perl 5 gained widespread popularity in the late 1990s as a CGI scripting language, in part due to its powerful regular expression and string parsing abilities.

NCSA HTTPd

3 links

Early, now discontinued, web server originally developed at the NCSA at the University of Illinois at Urbana–Champaign by Robert McCool and others.

Early, now discontinued, web server originally developed at the NCSA at the University of Illinois at Urbana–Champaign by Robert McCool and others.

It also introduced the Common Gateway Interface, allowing for the creation of dynamic websites.

Sample form. The form is enclosed in an HTML table for visual layout.

Form (HTML)

3 links

Sent to a server for processing.

Sent to a server for processing.

Sample form. The form is enclosed in an HTML table for visual layout.
Registration form of PHP-based e-commerce web-shop software ZenCart

Perl scripts are traditionally used as Common Gateway Interface applications (CGIs).

Robert McCool

2 links

Software developer and architect.

Software developer and architect.

One of Robert McCool's many contributions was in drafting the initial specification of the Common Gateway Interface (CGI), in collaboration with others on the www-talk mailing list, and providing a reference implementation of CGI in version 1.0 of the NCSA HTTPd web server.

An address bar on Google Chrome showing a URL with the query string.

Query string

2 links

Part of a uniform resource locator that assigns values to specified parameters.

Part of a uniform resource locator that assigns values to specified parameters.

An address bar on Google Chrome showing a URL with the query string.

Also some web servers supporting CGI (e.g., Apache) will process the query string into command line arguments if it does not contain an equals sign, ' ' (as per section 4.4 of CGI 1.1).

FastCGI

2 links

Binary protocol for interfacing interactive programs with a web server.

Binary protocol for interfacing interactive programs with a web server.

It is a variation on the earlier Common Gateway Interface (CGI).

Web framework

1 links

Software framework that is designed to support the development of web applications including web services, web resources, and web APIs.

Software framework that is designed to support the development of web applications including web services, web resources, and web APIs.

In 1993, the Common Gateway Interface (CGI) standard was introduced for interfacing external applications with web servers, to provide a dynamic web page that reflected user inputs.