Php-cgi.exe often crash, what is the reason?

Source: Internet
Author: User
Php-cgi.exe often crash, what is the reason? The nginx + php environment php-cgi.exe built on the machine often crash, what is the reason? Nginx + php environment built on the local machine

Reply content:

Php-cgi.exe often crash, what is the reason? Nginx + php environment built on the local machine

Send the error report. Otherwise, how can I know the cause of the crash.
I suggest using a one-click package in a non-production environment. if something goes wrong, you can recover it or change the installation to save your effort (XD)

The program may be corrupted, the code may be faulty, or you have used some unstable php extensions. Or some anti-virus software mistakenly kills this process.

After reading people's source code, add an environment variable:

Although php-cgi supports running in the background, this operation mode is unstable.
So there will be CGI process manager and other things to solve this problem.
The following describes Apache, Nginx, and IIS functions.
For example, the Apache FastCGI Process Manager module mod_fcgid has the function of managing and maintaining the number of PHP-CGI processes, andmod_proxy_fcgiNginx fastcgi_pass is similar, that is, Nginx is not responsible for managing the CGI process at the backend, and Nginx is only responsible for proxy. linux often with Nginx use PHP-FPM can manage their own PHP-FPM sub-process (with PHP-CGI process irrelevant), so very stable. microsoft also developed a PHP-CGI process Manager PHP Manager for IIS.

Finally, we will summarize the common PHP running methods:

Nginx fastcgi_pass      <=> PHP-FPMApache + mod_proxy_fcgi <=> PHP-FPMApache + mod_php        <=> libphp5.so/php5apache2_4.dllApache + mod_fcgid      <=> PHP-CGIIIS + PHP Manager       <=> PHP-CGI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.