![]() ![]() You may not have needed to understand these details before, because hosting companies and GNU/Linux distros come with everything prepared for us. There are other methods for chaining PHP with Apache and other web servers, but mod_php is the most popular one and will also serve for answering your question. This module is actually PHP itself, but compiled as a module for the web server, and so it gets loaded right inside it. ![]() For Apache HTTP Server, the most popular is “mod_php”. There are multiple ways to chain the web server with PHP. ![]() So we configure the web server to forward requests to PHP for processing, then receive the result and send it back to the user. PHP itself does not respond to the actual HTTP requests - this is the job of the web server. Needed background on how PHP “integrates” with web servers: For the purpose of answering this question, we are only concerned with the two models above, and taking Apache HTTP server as an example. There are also other completely different concurrency models (using Asynchronous sockets and I/O), as well as ones that mix two or even three models together. ![]() But it supports another concurrency model called the prefork MPM which uses processes - that is, the web server will create/dedicate a single process for each request. The Apache HTTP web server supports multiple models for handling requests, one of which (called the worker MPM) uses threads. A pretty popular technique is using threads - that is, the web server will create/dedicate a single thread for each incoming request. Needed background on concurrency approaches:ĭifferent web servers implement different techniques for handling incoming HTTP requests in parallel. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |