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…

Which configurations of nginx, phpfpm, and php are used more and are important and need to be paid attention to in small and medium-sized projects?

Which configurations of nginx, phpfpm, and php are used more and are important and need to be paid attention to in small and medium-sized projects?

Backend Development | PHP Tutorial php-fpm, nginx, php Back-end development-php tutorial went to see their various configurations, there are too many, and it is impossible to understand them one by one with the current primary operation and maintenance level, so I plan to ask everyone what configurations you are familiar with and need to know, how Configuration can better maintain the project and improve performance. Website source code infringement, how to shrink the screen with vscode, load hard disk on ubuntu, connect tomcat to mobile phone, crawler onlyfans, php call center, how to quickly learn seo collection, php e-commerce website course design source code, youtube follow template lzw Ali confession source code, ubuntu dual System efi, how to download tomcat installation package, customer focus on reptiles, Kouding Academy php training content, 020SEOlzw reply content: imitation mobile source code download, ubuntu download suddenly stopped, python crawler anti-climbing, php mysqlajax, SEO Knowledge homework lzw went to see their various configurations, there are too many, and it is impossible to understand them one by one with the current primary operation and maintenance level, so I plan to ask everyone what configurations you are familiar with that you need to know, and how to…

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…

Technology sharing pictures

Check the directory where nginx, apache, php, phpfpm, mysql and configuration items are located in linux

A lot of times, I will log in to an unfamiliar server;When the environment needs to be adjusted;There is really nothing at the beginning; all equipment depends on fighting;Two Looking for configuration items everywhere;Fortunately, I have a note here; You can summarize it first;Mostly use which to get the directory first;Then get the location of the configuration item; which mysql /usr/bin/mysql /usr/bin/mysql –help | grep -A1 ‘Default options’ Bash Copy which php /usr/local/apache2/php/bin/php php -i | grep “Loaded Configuration File” Bash Copy ps -ef | grep ‘http’ /usr/local/apache2/bin/httpd -V | grep ‘SERVER_CONFIG_FILE’ Bash Copy Put it together: /usr/local/apache2/conf/httpd.conf ps -ef | grep ‘nginx’ Bash Copy If not, then according to the above picture The nginx location in the execution /www/server/nginx/sbin/nginx -t Bash Copy The directories of nginx and configuration items are all available; ps -ef | grep ‘php-fpm’ Bash Copy The configuration item file path can be seen at a glance Arrived; Linux checks the directory where nginx, apache, php, php-fpm, mysql and configuration items are located

nomappingfortheunicode,phpfpm

The status information of the two is different under different HTTP protocols. HTTP/1.0 302 status is movedtemporarilytherequestedresidetemporarilyunderadifferenturi.sincetheredirectionmaybealteredonococcturl If HTTP/1.1 302 status is foundtherequestedresidetemporarilyunderadifferenturi.sin cetherredirectionmightbealteredonoccasion, theclientshouldcontinuetousetherequest-uriforfuturerequests. this response is only cacheable if indicated by acache-controllerexpior

PHPFPM

What is PHP-FPM? PHP-FPM is a PHP-specific process manager that implements the FastCGI protocol for managing PHP-CGI. install PHP-FPM has been integrated into PHP after PHP5.3.3 and does not need to be installed separately. use Startup ? ~ sudo php-fpm [15-Feb-2015 15: 52:10] NOTICE: fpm is running, pid 6995 [15-Feb-2015 15: 52:10] NOTICE: ready to handle connections The second line above is the process number pid 6995 after php-fpm starts. After starting in this way, php-fpm will occupy the terminal to run. Restart ? logs git:(master) sudo kill -SIGUSR2 6995 //6995 is the process number of php-fpm [15-Feb-2015 15: 54:51] NOTICE: Reloading in progress … [15-Feb-2015 15: 54:51] NOTICE: reloading: execvp(“php -fpm”, {“php-fpm”}) [15-Feb-2015 15: 54:51] NOTICE: using inherited socket fd=6 , “127.0.0.1:9000” [15-Feb-2015 15: 54:51] NOTICE: fpm is running, pid 6995 [15-Feb-2015 15: 54:51] NOTICE: ready to handle connections Smooth closing ? logs git:(master) sudo kill -SIGQUIT -7688 [15-Feb-2015 16: 19:01] NOTICE: Finishing … [15-Feb-2015 16: 19:01] NOTICE: exiting, bye-bye! Force close ? logs git:(master) sudo kill -SIGINT|SIGTERM 6995 // Both SIGINT and SIGTERM signals are available [15-Feb-2015 16: 10:43] NOTICE: Terminating … [15-Feb-2015 16: 10:43] NOTICE: exiting, bye-bye! Reopening the log file, not sure what this means. .…

Summary of long-standing problems cgi, fastcgi, PHPfpm

Summary of long-standing problems cgi, fastcgi, PHPfpm

A vague concept Whether it is php, python programming language, or apache, the nginx server is an inescapable topic for the cgi protocol. Installation and deployment will often be seen, so what do they do, there are many answers on the Internet! A wave of summarization through them today will bid farewell to this difficulty. Reference: https://www.dayuzy.com/?p=476 HTTP to cgi protocol When the client of the browser enters the website and goes to the web server through the http protocol, such as apache, everyone knows this . If the web server does not have the function of processing php files, it will request the php interpreter (php-cgi.exe). Or, instead of a PHP file, such as a python file, the web server will also request the python interpreter. Since there are so many interpreters, there must be a protocol to stipulate their standards, otherwise they will be messed up. At this time, the cgi protocol comes out. To put it bluntly, it is apache/nginx and the backend A protocol developed between scripting languages ​​(php, python, etc.) interaction. What is php-cgi? In the windows system, after installing php, there are the following three files under the installation directory: php.exe: Execute the php…

HTTP, PHPFPM, and handshake protocols

The process of HTTP request combing The user enters the url such as http:www.baidu.com to the browser, and the browser such as chrom needs to parse it into an IP address to know where to visit which server. The steps for the browser to resolve DNS are as follows Search the browser’s own dns cache, which has a short cache time and a limited number of caches. Search the dns cache of the operating system Read the dns mapping of the host file (generally, the local development mapping is to modify this file to achieve the purpose of intercepting browser requests to the local server, So that the local can successfully map the server address) First, the dns server in the local network card configuration initiates a domain name resolution request. There seem to be some processes below, since this step is basically not executed, generally the dns server of the dns operator will handle it. The parsing fails, and any of the above steps succeed will return a successful ip address The browser uses a random port The specific port (default 80) sharing this ip address initiates the famous TCP 3-way handshake. The process of how an http request…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: 34331943@QQ.com

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
首页
微信
电话
搜索