Web server summarizes _php instances using PHP to generate Web pages in three ways

Source: Internet
Author: User

Found on the MySQL help document when looking for Mysql_pconnect, here.

Web server uses PHP to generate a Web page of three of the following three kinds:

One: PHP as a CGI wrapper. in this way, each request to the Web server will cause a PHP parser process to be created, and the PHP parser process terminates when the PHP page executes.

two: In a multi-process Web server, PHP is used as a module of the Web server. This is the most popular practice at the moment, but it is only apahce in this way at present. A multiple-process Web server usually has a total parent process that coordinates a bunch of child processes to work. When a page request arrives in the Web server, the parent process hands the request to an idle subprocess to complete. Two requests for the same client are not necessarily handled by the child process of the same Web server.

three: In a multi-threaded Web server, PHP as a plug-in. For example, IIS uses this method. It works as much as a process, but it uses threads rather than processes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.