<<

• Introduction • Web Browsing • Browsing using CGI • CGI Architecture Diagram • Scripting Languages for CGI • Support & Configuration • Introduction to • Applications • Scope of Research

• The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom script.

• The Common Gateway Interface, or CGI, is a standard for external gateway programs to interface with information servers such as HTTP servers.

• The current version is CGI/1.1 and CGI/1.2 is under progress.

• CGI stands for Common Gateway Interface-- in other words, a standard ("common") way of communicating ("interface") between different processes ("gateway").

To understand the concept of CGI, lets see what happens when we click a hyper link to browse a particular web page or URL

• Your browser contacts the HTTP web server and demand for the URL ie. filename. • Web Server will parse the URL and will look for the filename in if it finds that file then sends back to the browser otherwise sends an error message indicating that you have requested a wrong file. • takes response from web server and displays either the received file or error message.

 However, it is possible to set up the HTTP server so that whenever a file in a certain directory is requested that file is not sent back; instead it is executed as a program, and whatever that program outputs is sent back for your browser to display. This function is called the Common Gateway Interface or CGI and the programs are called CGI scripts. These CGI programs can be a PERL Script, , or C++ program etc.

CGI or Common Gateway Interface is what make the forms work. There are many language that could function as CGI language like Perl, C, C++, Tcl, Unix Shell Script etc. CGI scripts can be written in a variety of computer languages, but Perl is without dispute the most used languages for CGI scripting.

make sure that your Web Server supports CGI and it is configured to handle CGI Programs.

All the CGI Programs be executed by the HTTP server are kept in a pre-configured directory. This directory is called CGI Directory and by convention it is named as /cgi-bin. By convention PERL CGI files will have extention as .cgi.

Perl or Practical Extraction and Report Language is described by Larry Wall, Perl's author, as follows:

Perl is an interpreted language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for any system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).

 Perl is a stable, cross platform programming language.  Perl stands for Practical Extraction and Report Language.  It is used for mission critical projects in the public and private sectors.  Perl is Open Source software, licensed under its Artistic License, or the GNU General Public License (GPL).  Perl was created by Larry Wall.  Perl 1.0 was released to usenet's alt.comp.sources in 1987  PC Magazine named Perl a finalist for its 1998 Technical Excellence Award in the Development Tool category.  Perl is listed in the Oxford English Dictionary  The sort answer is interpreted, which means that your code can be run as is, without a compilation stage that creates a nonportable executebale program.

 So it is not quite the same as shells, or Tcl, which are "strictly" interpreted without an intermediate representation. Nor it is like most versions of C or C++, which are compiled directly into a machine dependent format.  ActivePerl for windows - For programming in Windows. Linux don't need any special outside interpreter because it already has it in most of the distributions.  A Good text editor with syntax highlighting support for perl and ability to run script on the interpreter. Eg. Crimson Editor.  A server capable of handling perl scripts - to make CGI Perl scripts Sambar Server.

In Unix/Linux you can execute your perl scripts by typing "perl " at command prompt. If you have ActivePerl, you can execute it by double clicking a perl file in Windows.

• These are examples of completed based on

• CGI::Application. Source code is usually not available. • proyectoweb2.com – Centro de capacitacion use CMS - CGI::Application • Unlibrary.com – book sharing and cataloging site, uses CGI::Application, My SQL, Apache on Linux • Dis-Order (metal music webshop) – uses CGI::App, Postgre SQL, Apache (mod_perl) on Free BSD • Adopt-A-Pet.com, by Summersault. Also uses mod_perl. • Page-A-Day® Calendars Online – CGI::Application, My SQL & Apache on Linux • Workman.com – , site search, shopping cart and Gift-O-Matic are all CGI::Apps • iMeleon photography – uses CGI::App, My SQL, Apache on Linux • And Many more..  Popularity Contest for CPAN Modules  Offline Command Line Search for CPAN  Which tests matter?  Binary CPAN mirror

 How to get the Web Server Support & Configuration?  Virtual Common Gateway Interface Program on the Network Using the Destination Addressing Control System Scheme