Question

I have some experience with php / python programming and i am curious to know how actually servers like apache / light httpd gives data to the script?

Can it be bypassed to a c/c++ program ? and handled via that?

Sorry for this kinds of question. I am too much curious. Googled it but can not find a really good answer.

Was it helpful?

Solution

Today, probably the most used and with less overhead is SAPI: http://en.wikipedia.org/wiki/Server_Application_Programming_Interface

Some examples of SAPI is ISAPI that is mostly for IIS, Apache modules for Apache, and the list extends with Servers.

But each server can implement their own.

Note: The module or external program is what parses the script. The SAPI, CGI, FastCGI and whatever will integrate with the interpreter of the script, a binary. The interpreter then receive the request path, find the script file, and parse it. Ex: PHP has its apache and IIS modules.

OTHER TIPS

These things follow a request-response pattern where a request is made to a web server. The web server will process the request and execute any server side code (script) associated with the url that the request resolves to (web service or web page typically). The script will execute and result in a response that is sent back to the caller.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top