web server summary of three ways to generate web pages using php

  • 2020-10-23 20:54:45
  • OfStack

What was found on the mysql help document when looking for mysql_pconnect, note here.

web server USES php to generate a page of web in three forms:

1: Use PHP as CGI Wrapper. In this way, each request to web server results in the creation of an php parser process, and the php parser process terminates when the execution of the php page ends.

2: In multi-process web server, php is used as one module of web server. This is by far the most popular method, but is currently the only one used by apahce. A multi-process web server usually has a total parent coordinating 1 heap child process to work. When the page request reaches web server, the parent passes the request to a free child process to complete. Two requests with an client are not necessarily processed by a child process with an web server.

3: In multithreaded web server, use php as a plug-in. IIS, for example, USES this approach. It works in the same way as multi-process works, except that it USES threads instead of processes.


Related articles: