Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can someone please post a concrete example of a CGI script and explain how it is handled by the web server?

share|improve this question

closed as not a real question by A Dwarf, slhck, random Jul 15 '11 at 12:31

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
3  
Why do you need to know? What is the specific problem you are facing? What research have you done before? Please take a look at the How to ask guide. > If you ask a vague question, you’ll get a vague answer. –  slhck Jul 15 '11 at 12:25
add comment

2 Answers

up vote 2 down vote accepted

A CGI (common gateway interface) script can be written in almost any language, and can be designed to do an endless number of things, so the handling of it by the web server will vary depending on the context.

The WDG wrote an very informative introduction to all things CGI, I think you will find it to be what you are looking for. You can find it here: http://htmlhelp.com/faq/cgifaq.1.html

share|improve this answer
add comment

CGI is not a scripting language, is a way for web servers to interact with custom back-end applications which generate dynamic web pages; historically, it has been the first system used for this purpose, long before things like ISAPI filters existed.

A CGI program should conform to a specific protocol for exchanging input and output with the web server, but as long as it conforms to the specifications, it can be written using any language, from a shell script to a compiled C executable.

More info here.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.