This article only introduces the optimization method of PHP-FPM. However, when used in combination with nginx, optimizing one of them separately does not play a particularly important role, at the same time, nginx needs to be optimized. for nginx
Linux environment: Debian 6 Stable
Program Version selection:
Nginx:tengine 1.2.4Taobao produced, based on Nginx and introduced a number of new features
mysql:5.1.66The latest version of the 5.1 series. The reason for not 5.5 is that 5.5 started
# in Nginx and PHP-FPM next visit Nginx on the instant 502 question Php-fpmsignal 7 (Sigbus)
Failure phenomenon
Use the tinkphp3.2.x frame, the page occasionally appear a visit Nginx on the report 502 bad Gateway, not wait for a period of time
For security php-fpm, the default is initiated by the Apache user
[Root@chaoge ~]# Ps-aux | grep php-fpmWarning:bad syntax, perhaps a bogus '-'? See/usr/share/doc/procps-3.2.8/faqRoot 4539 0.0 0.0 205552 3716? Ss 10:22 0:00 php-fpm:master process (/
A CENTOS6+NGINX+MYSQL+PHP-FPM environment was installed in the virtual machine yesterday, recording the installation process. CENTOS6 recommends installing in a netinstall manner, installing a minimized server, and configuring the site environment,
PHP-FPM has a built-in status page, opened to view the detailed operation of PHP-FPM, to php-fpm optimization to bring help. The following article will record how to view and monitor the PHP-FPM running status in real time.
Open php-fpm.conf,
Nginx is a Web server, so the Nginx access log only to access the page records, there will be no PHP error log information.Nginx to the PHP request to the PHP-FPM fastcgi process to handle, the default PHP-FPM will only output PHP-FPM error message,
Brief introduction:
PHP-FPM is a PHP FastCGI manager, General Nginx run PHP program will be thrown to the PHP program php-fpm to resolve. All right, that's it!
PHP 5.4 began to integrate the PHP-FPM, that is, when compiling PHP, as long as--ENABLE-
{Code...} view the php-fpm log and find the above prompt. Try to change the user and group of php-fpm to the one matched by the current user. The error persists. Through the lsof-Pni4 | grepLISTEN | grepphp we can see that php-fpm does run as the
PHP-FPM widely known as the FastCGI process Manager, it is an improvement in PHP FastCGI implementation with more useful features for handling high-load servers and Web sites. Some of these features are listed below:• Advanced process management
1. view the current php configuration information
Create the findini. php file in the root directory of the php project. The content is as follows:
Visit the page to see the following page:
Search for Loaded Configuration File to find out which
Next, let's take a look at the php prompt Undefinedvariable: several articles about php-fpm operations. I hope this article will help you. A previously written php script appears when it is changed to php5.5.8... next, let's take a look at the php
I found in the personal blog of the Linux service, the database of this service is often unable to use the need to restart to be able to access the normal, so give everyone the solution to this problem.
Analyze problems
After discovering the
Mod_php, FastCGI, PHP-FPM and other PHP running mode comparison, mod_phpfastcgi. Mod_php, FastCGI, PHP-FPM and other PHP running mode comparison, mod_phpfastcgi summary write this article is because today to build LNMP environment under Ubuntu,
: This article describes how to solve the 502badgateway error in nginx + php-fpm. if you are interested in the PHP Tutorial, refer to it. 1. nginx error cannot be found. Generally, you need to modify/usr/local/nginx/conf/nginx. conf (careful
Php5.4 php-fpm restart, termination operation command PHP-FPM using signal control: The master process can understand the following signal INT, the TERM immediately terminates QUIT and ends USR1. re-opens the log file USR2. smoothly reload all
Nginx running PHP through fastcgi than Apache contains PHP environment has obvious advantages, recently, there is a message that PHP5.4 will most likely put php-fpm patch in the kernel, Nginx server platform to run PHP will be more relaxed, Let's
first, we want to distinguish between the "/usr/local/php/etc/php-fpm.conf" file and the "/usr/local/php/etc/php.ini" file. /usr/local/php/etc/php-fpm.conf is php-fpm the file used by this service, and manages the related configuration of PHP-FPM
php-cgi, why not? What does the PHP-FPM child process do?PHP-CGI is the original PHP comes with the FASTCGI process Manager, there are some shortcomings, such as not smooth restart, process management poor.PHP-FPM can be seen as an upgraded version
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.