CGI or Common Gateway Interface is a standard for exchanging data between Web server and third software that handles requests.It is a method for dynamic sites. Other server-side scripting technologies like PHP, ASP has gradually limited the usage of CGI and can be found still on old traditional servers and webpages which shows suspended account webpage.
Details of CGI or Common Gateway Interface
A web server that supports CGI provides the external software in a available runtime environment is available, which in particular for Environment variables (for example, ” SERVER_NAME “) that help the program to gather information about the query server setting and situation. The names and the format of the contents are largely standardized.
Those programs for CGI those are created by a third party, can be run on the Web and is highly relevant to safety. Therefore, Server Administrators make sure that any running program via CGI is allowed to perform only certain limited types of program routines (so that the Web server files are not deleted or replaced, for example). The Apache web server run CGI programs with the help of a module and secures against such attacks. The security measures are built in several stages and so strict that many server administrators have started to run other server-side CGI languages.
Advantages and Disadvantages of CGI
To load rather than just static pages from a Web server, it is easy with CGI to generate HTML pages dynamically. These does not pulls webpages directly from the server, but can be generated by the CGI program.
In addition, CGI programs can be written in many programming languages, because the requirements do not go beyond the above.
Disadvantage of CGI execution is their relatively low speed, since for each CGI invocation, a new process is executed. On high-traffic pages CGI is therefore now no longer used now, because even approaches such as FastCGI , which eliminates certain disadvantages of CGI, could not prevail, at least on a frontside.
To address this problem of CGI, there are now, for example, for the Apache Web server modules, interpreter modules for various scripting languages ??(like mod_perl for perl , mod_python for Python etc.) integrated directly into the web server process. Another, often more efficient way is to let the CGI programs run by them as external processes and FastCGI to pass the requests of the browser.
Follow the Author of this article :