What is CGI and Do I need It

Discussion in 'Web Design & Coding' started by Heeter, Aug 4, 2003.

  1. Heeter

    Heeter Overclocked Like A Mother

    Messages:
    2,732
    Hi Guys,

    What is CGI and do I need it? I am trying to start up a webbased business and registered my domain with No-IP.com. They resolve my dns, and I do have win2000 server OS. No-IP also supplied me with an FTP address and a mail address as well with my domain registration. I know I am going to use a shopping cart app. Thanks in advance.


    Heeter
     
  2. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    To use CGI is to execute code on the webserver, mostly used for dynamic web pages, such as your webshop. Normally this is compiled code or scripted code (often Perl). You could also use PHP and ASP which (afaik) do not count as CGI. So depending on what that app is written in, you may or may not need CGI.
     
  3. Heeter

    Heeter Overclocked Like A Mother

    Messages:
    2,732
    Hi Zedric,

    So in your opinion, since No-ip is resolving my DNS for my other stuff (FTP server), will it be enough to avoid CGI? No-IP will resolve DNS for my webpage as well.

    Thanks,

    Heeter
     
  4. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    The one has nothing to do with the other. CGI is about webserver configuration, DNS is about finding a computer on a network (the internet).

    If anything you want to run on the webserver needs CGI, you need CGI, otherwise not. But it never harms to have it enabled.
     
  5. Heeter

    Heeter Overclocked Like A Mother

    Messages:
    2,732
    Thanks Zedric,

    I kinda knew I was climbing up the wrong tree. I am adding a shopping cart to the site, so the only real I am confused about is this CGI, Will Apache or IIS have this integrated, or am I in the wrong tree again. I guess I am trying to figure out if I need it. Sorry, I am a noobie to this part. So if the shopping cart app needs it then I must get it?

    Thanks so far,

    Heeter
     
  6. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    CGI
    Abbreviation of Common Gateway Interface, a specification for transferring information between a World Wide Web server and a CGI program. A CGI program is any program designed to accept and return data that conforms to the CGI specification. The program could be written in any programming language, including C, Perl, Java, or Visual Basic.

    CGI programs are the most common way for Web servers to interact dynamically with users. Many HTML pages that contain forms, for example, use a CGI program to process the form's data once it's submitted. Another increasingly common way to provide dynamic feedback for Web users is to include scripts or programs that run on the user's machine rather than the Web server. These programs can be Java applets, Java scripts, or ActiveX controls. These technologies are known collectively as client-side solutions, while the use of CGI is a server-side solution because the processing occurs on the Web server.

    One problem with CGI is that each time a CGI script is executed, a new process is started. For busy Web sites, this can slow down the server noticeably. A more efficient solution, but one that it is also more difficult to implement, is to use the server's API, such as ISAPI or NSAPI. Another increasingly popular solution is to use Java servlets.

    PHP
    Self-referentially short for PHP: Hypertext Preprocessor, an open source, server-side, HTML embedded scripting language used to create dynamic Web pages.

    In an HTML document, PHP script (similar syntax to that of Perl or C ) is enclosed within special PHP tags. Because PHP is embedded within tags, the author can jump between HTML and PHP (similar to ASP and Cold Fusion) instead of having to rely on heavy amounts of code to output HTML. And, because PHP is executed on the server, the client cannot view the PHP code.

    PHP can perform any task that any CGI program can do, but its strength lies in its compatibility with many types of databases. Also, PHP can talk across networks using IMAP, SNMP, NNTP, POP3, or HTTP.

    ASP
    Abbreviated as ASP, a specification for a dynamically created Web page with a .ASP extension that utilizes ActiveX scripting -- usually VB Script or Jscript code. When a browser requests an ASP, the Web server generates a page with HTML code and sends it back to the browser. So ASPs are similar to CGI scripts, but they enable Visual Basic programmers to work with familiar tools.
     
  7. freightgod

    freightgod Confused and Bewildered

    Messages:
    561
    CGI is short for Cool Graphics Initiative, and you should buy two.
     
  8. Heeter

    Heeter Overclocked Like A Mother

    Messages:
    2,732
    AAAHHH!
    Gots it me friend. Thanks for clearing that up. By adding the PHP and ASP made me realize what CGI is, Thanks, Speedy.

    Heeter
     
  9. lechtard

    lechtard Guest

    php and asp are better than cgi .. I don't look for cgi to be around very much longer, everyone is moving to php because it's more secure.
     
  10. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    and ASP is the devil ;)
     
  11. Tabula Rasa

    Tabula Rasa Stranger Than Kindness Political User

    Messages:
    3,233
    Location:
    Israel
    and you like young oriental boys ;)
     
  12. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    You my friend need to watch his mouth on forums where young boys hang.
     
  13. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    Careful now or I will moderate you
     
  14. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    hrm. A mod abusing his power ?