Ive seen a folder called cgi-bin quite long while using apache.
How do scripts help me?
how can i use them?
I’ve used php and ajax only for web development!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
G’day,
A web server, e.g. Apache, just sends back static content is response to a client request for content. For example a request for http://www.myserver.com/index.html typically causes the server to open the file and return the content of the file wrapped with the relevant http components.
Basically CGI is a technique for generating such web pages dynamically via other applications which are run by the web server on an as-needed basis.
The directory cgi-bin is typically used to house the scripts being run.
Though it’s heavily focused on Perl The book “CGI Programming with Perl” has an excellent intro about CGI.
Edit: As asked in the comments below, “if PHP can take care of dynamic content, then what’s the need for CGI”. There’s a few points here.
The design of the PHP language itself also contains many inconsistencies, e.g.
I believe that PHP5 goes a long way to improving these points.
While security is always a concern, with CGI implementations you are able to minimise the security problem in well publicised ways.
HTH
cheers,