Summary of three methods for web server to generate web pages using php

Source: Internet
Author: User

Find what was found in the mysql help document during mysql_pconnect, and record it here.

The web server uses php to generate a web page in three ways:

I. Use PHP as CGI Wrapper. In this way, each request to reach the web server will cause a php parser process to be created. When the execution of this php page ends, the php parser process will terminate.

2. Use php as a web server module in a multi-process web server. This is currently the most popular practice, but this method is only used by apahce. A multi-process web server usually has a parent process that coordinates a bunch of sub-processes to work. When a page request arrives at the web server, the parent process submits the request to an idle sub-process for completion. The two requests of the same client may not be processed by the sub-processes of the same web server.

3. Use php as a plug-in a multi-threaded web server. For example, IIS uses this method. It works in the same way as a multi-process, but it uses threads instead of 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.