Home > Article > Backend Development > Does php need an application server?
Does php need an application server?
php needs an application server because the php program needs to open a port to listen on 9000 Port used to communicate with the web server.
The following is the communication process between the browser and PHP and MySQL servers.
1) The user's web browser issues an HTTP request to request a specific web page.
2) The Web server receives the .php request to obtain the file, and passes it to the PHP engine, asking it to process it.
3) The PHP engine starts parsing the script. The script has a command to connect to the database, and a command to execute a query. PHP opens a connection to the MYSQL database and sends the appropriate query.
4) The MYSQL server receives database queries and processes them. Return results to the PHP engine.
5) PHP is used to complete the script execution. Typically, this includes formatting the query results into HTML format. Then output the HTML back to the web server.
6) The web server sends HTML to the browser.
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of Does php need an application server?. For more information, please follow other related articles on the PHP Chinese website!