Simple understanding of CGI, FastCGI, PHPCGI, PHPFPM

1. What is CGI? It is the common gateway interface protocol, a protocol. CGI is a protocol that stipulates which data to transmit and in what format to pass it to the rear to process the request. 2. What is FastCGI? FastCGI is like a long-live CGI. The same thing as CGI, optimized, is also a protocol 3. What is php-CGI? PHP-CGI is the FastCGI process manager that comes with PHP. 4. What is php-fpm? Third-party FastCG I process manager, solve some problems of PHP-CGI, and manage PHP-CGI. 5. What is the relationship between php-fpm and fastcgi? php-fpm is for php, implements the FastCGI protocol, and provides a process manager for php-CGI management. 6. What problem does php-fpm solve? Graceful restart of php-CGI. Resident administration of php-CGI. (Permanent here means that php hangs up after the php-CGI process is killed, and php-fpm will restart php-CGI after the php process is killed) Realization of dynamic and static separation? 7. php-fpm runs independently on non-web servers to achieve the so-called dynamic and static separation. 8. Both php-cgi and php-fpm on php are php’s implementation of the FastCGI protocol. The latter also provides management of the php-CGI process. 9. Since FastCGI is multi-process,…

Talking about CGI, FastCGI, PHPCGI, PHPFPM!

php web Write your review! Let’s make a fuss, see everything Member Login | User Registration recommended reading io How to let php customize the suffix? Guide: Today’s programming notes are to share with you about how to customize the suffix of php. If it happens to solve the problem you are facing now, don’t forget to pay attention to this site, let’s start now! List of contents of this article: … [detailed] Crayon Shinchan 2023-09-02 21:14:05 web Why does ai use php language (php ai) Guide: Many friends have asked questions about why AI uses php language. The programming notes in this article will give you a detailed answer for your reference. I hope it will be helpful to you! Let’s take a look together! List of contents of this article: … [detailed] Crayon Shinchan 2023-09-02 21:12:07

CGI, FastCGI, PHPCGI, PHPFPM, SpawnFCGI mode comparison

What is CGI The full name of CGI is “Common Gateway Interface”, a tool for the HTTP server to “talk” to programs on your or other machines, and its programs must run on the network server. CGI can be written in any language, as long as the language has standard input, output, and environment variables. Such as php, perl, tcl, etc. What is FastCGI FastCGI is like a resident (long-live) CGI, it can be executed all the time, as long as it is activated, it will not cost every time*The source of this article is gaodai#ma#com品@代~ Code^Net+Gaodaima Code time to fork once (this is the most criticized fork-and-execute mode of CGI). It also supports distributed computing, that is, the FastCGI program can be executed on a host other than the web server and accept requests from other web servers. FastCGI is an open CGI extension with a language-independent, scalable architecture. Its main behavior is to keep the CGI interpreter process in memory and thus obtain higher performance. As we all know, the repeated loading of the CGI interpreter is the main reason for the low performance of CGI. If the CGI interpreter is kept in the memory and accepts the…

Technical Image

The difference between cgi, fastCGI, phpfpm, phpCGI

The difference between cgi, fastCGI, php-fpm, php-CGI As a high-frequency hot topic in the interview, a wave of records must be made: What is the process between sending a request and receiving a response? If the client requests index.html, then the server r finds this file in the file system and sends it to the browser, where static data is distributed. If we request index.php, the server will analyze it as a dynamic file after receiving the request, and then start the corresponding CGI program. This is the PHP parser. The parser first parses our php The .ini file initializes the execution environment, and then parses the index.php page. After the parsing is completed, it returns to the server in the format specified by cgi, then exits the program, and the server returns the result to the client. This is a complete dynamic PHP Web access process. Next understand the concept: CGI: It is a protocol for data exchange between the server and the application. FastCGI: Same as CGI, it is a communication protocol, but it is more efficient than CGI. Likewise, the SCGI protocol is similar to FastCGI. PHP-CGI: It is the interface program of CGI protocol provided by…

Detailed explanation of the relationship between CGI, FastCGI, PhpCGI, and Phpfpm

Detailed explanation of the relationship between CGI, FastCGI, PhpCGI, and Phpfpm

In order to better understand the relationship between CGI, FastCGI, PHP-CGI, and php-fpm, this article has been sorted out separately based on the information. 1. What is CGI? CGI (Common Gateway Interface) Common Gateway Interface, CGI is an interface standard between external applications (CGI programs) and WEB servers, and is the interface between CGI programs and Web servers The process of passing information between. Web servers generally only process static file requests (such as jpg, htm, html). If a dynamic script request (such as php) is encountered, the server cannot directly run php You can’t do this kind of file by yourself, outsource it to others, but you have to make an agreement with php, what I give you, and then you give me what. Then this agreement is the CGI agreement. The script that implements this protocol is called a CGI program. The main process of the web server forks a new process to start the CGI program. Starting the CGI program requires a process, such as reading configuration files, loading extensions, etc. After the CGI program is started, it will parse the dynamic script, then return the result to the web server, and finally the web server will…

Thoroughly understand the operating principles of cgi, fastcgi, phpcgi, phpfpm and php in php

1.CGI The earliest web servers only processed static html files. With the continuous development of technology, websites become more and more complex, and then dynamic websites appear, but the service cannot directly run dynamic language files such as php and asp, and then cgi appears, which is just an interface protocol . The full name of CGI (Common Gateway Interface) is “Common Gateway Interface“, which is passed between the Web server and external applications (CGI programs). Information interface standard. Through the CGI interface, the Web server can obtain the information submitted by the client, and transfer it to the CGI program on the server side for processing, and finally return the result to the client. CGI can be written in any language, as long as the language has standard input, output, and environment variables. Such as php, perl, tcl, etc. The web server receives the request, and then forks a new process according to the content. This process will return the processed data to the web server, and finally the web server sends the content to the user. The fork process just now follows After exiting, if the user also requests to change the dynamic script next time, the web…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索