SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: What is CGI?

  1. #1
    SitePoint Zealot maxdream01's Avatar
    Join Date
    Feb 2011
    Location
    USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question 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.
    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.

    Thanks,
    Maxdream01
    PHP is FUN

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    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.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,271
    Mentioned
    197 Post(s)
    Tagged
    3 Thread(s)
    PHP? When I see CGI I think Perl.

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

  4. #4
    SitePoint Zealot maxdream01's Avatar
    Join Date
    Feb 2011
    Location
    USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So basically its just a server that runs PHP or some other language?
    PHP is FUN

  5. #5
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    359
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

    http://en.wikipedia.org/wiki/Common_Gateway_Interface

    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.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  6. #6
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    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.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  7. #7
    SitePoint Zealot maxdream01's Avatar
    Join Date
    Feb 2011
    Location
    USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok thanks everyone, i think that gives me a good idea of what cgi is and what it does. Thanks.
    PHP is FUN


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •