FastCGI,PHP-CGI and PHP-FPM
CGI: Common Gateway Interface 通用网管协议 FastCGI: 一种CGI的实现方式 快 php-fpm: php FastCGI Process Manager(FastCGI进程管理器)
CGI CGI, Common Gateway Interface, is a tool for HTTP server to contact with programs on other servers, which can be used into any languages with standard input, standard output and environmental variables, such as PHP, Perl, or Tcl.
FastCGI FastCGI is a kind of CGI which is long-live, which will always be running. With FastCGI, it'll take less time t fork(which is a problem of fork-and-execute mode in CGI). In additional, FastCGI also supports for distributed computing.
PHP-CGI PHP-CGI is one kind of the Process Manager of FastCGI, which is within php itself. The command to boot is as follow: php-cgi -b 127.0.0.1:9000 shortcuts
After changing php.ini, you should reboot PHP-CGI to make the new php.ini work. When a PHP-CGI process is killed, all the PHP code will cannot run.(PHP-FPM and Spawn-FCGI do not have the same problem)
PHP-FPM
PHP-FPM is another kind of the Process Manager of FastCGI, which can be downloaded here.
It's actually a patch for PHP, which is used to integrate the Process Manager of FastCGI into PHP, which should be make into PHP before version 5.3.2.
PHP-FPM can be used to control sub processes of PHP-CGI: