Home > Backend Development > PHP Problem > What is the use of phpfpm

What is the use of phpfpm

(*-*)浩
Release: 2023-02-26 07:58:01
Original
3596 people have browsed it

PHP-FPM (FastCGI Process Manager: FastCGI Process Manager) is a PHPFastCGI manager. For php before PHP 5.3.3, it is a patch package designed to integrate FastCGI process management into PHP. in the bag.

What is the use of phpfpm

If you are using PHP before PHP5.3.3, you must patch it into your PHP source code before compiling and installing It can only be used after PHP. (Recommended learning: PHP Video Tutorial)

Compared with Spawn-FCGI, PHP-FPM has better CPU and memory control, and the former is easy to crash and must be performed with crontab Monitoring, while PHP-FPM does not have such worries.

Starting from PHP 5.4 RC2, php-fpm has been regularized and is no longer marked as EXPERIMENTAL (experimental stuff) by the php team.

PHP5.3.3 has integrated php-fpm and is no longer a third-party package. PHP-FPM provides a better PHP process management method, which can effectively control memory and processes, and can smoothly reload PHP configuration. It has more advantages than spawn-fcgi, so it is officially included in PHP. PHP-FPM can be turned on by passing the –enable-fpm parameter in ./configure.

Use PHP-FPM to control the FastCGI process of PHP-CGI

/usr/local/php/sbin/php-fpm{start|stop|quit|restart|reload|logrotate}
Copy after login

--start Start the fastcgi process of php

--stop Forced termination php's fastcgi process

--quit smoothly terminates php's fastcgi process

--restart restarts php's fastcgi process

--reload smoothly reloads php's php.ini

--logrotate Re-enable the log file

Can php-fpm be used with optimizers such as ZendPlatform, xcache, eAccelerator, APC, etc.?

Yes. The architecture of php-fpm works with any kind of shared memory for high-speed opcode caching. The only restriction is: only one cache can be used for all worker processes, even if they run with different uids/gids

The above is the detailed content of What is the use of phpfpm. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template