What is CGI?

Hey Everyone,

I’ve heard the term ‘CGI’ tossed around everynow and again, and im curious to what it actually is, i tried googling it and all i got was that it stood for Common Gateway Interface and that it is a “method for web server software to delegate the generation of web pages to executable files” - Wikipedia Article on CGI:eek:.
So i’m still pretty much clue less to what exactly it is, anyway if anyone knows please post back with a general description of what it is and what it does.


It is PHP. There you go, simple and non-technical.

CGI itself is just one standard method for a web server (Apache for example) to call and run PHP. CGI is not a language itself.

PHP? When I see CGI I think Perl.

I guess from back when I had an AOL hometown site and wanted matt’s formmail.

So basically its just a server that runs PHP or some other language?

CGI was one of the first technologies where web servers could run server-side programs, it stands for “Common Gateway Interface” and was developed in the very early days of the WWW.

Basically, cgi defines a directory on the web server where the web server is allowed to run executables. The executables can be written in many different languages like perl, c, and others. usually the defined directory shows up as the /cgi directory in your web space, but the name is configurable.

Newer technologies like PHP, ASP, NET, JSP and such have become more popular than CGI for dynamic websites.

I guess a lot of people forget that PHP can be setup with Apache as CGI…or as is the case most use FastCGI today. CGI is not bound to any language, it is just the interface for a web server to communicate with a server-side technology like PHP. It can be setup in so many different ways, but it is still CGI.

Ok thanks everyone, i think that gives me a good idea of what cgi is and what it does. Thanks.