How to enable errors in php fpm
php fpm method to enable errors: first find and open the "php-fpm.conf" file; then add the content as "error_log = log/php_error_log"; then modify the configuration in "php.ini"; and finally restart "php-fpm" will do.
Recommended: "PHP Video Tutorial"
Enable php-fpm php error log
Make the following settings to see how php-fpm does not record PHP error logs under nginx:
1. Modify the configuration in php-fpm.conf. If not, please add:
The code is as follows:
[global] error_log = log/php_error_log [www] catch_workers_output = yes
2. Modify the configuration in php.ini, if not, add it:
The code is as follows:
log_errors = On error_log = "/usr/local/php/var/log/error_log" error_reporting=E_ALL&~E_NOTICE
3. Restart php- fpm
When PHP executes an error, you can see the error log in "/usr/local/lnmp/php/var/log/php_error_log"
If it appears:
The code is as follows:
[root@localhost etc]# service php-fpm restart Gracefully shutting down php-fpm . done Starting php-fpm [17-Apr-2014 18:40:52] ERROR: [/usr/local/php/etc/php-fpm.conf:5] unknown entry 'catch_workers_ [17-Apr-2014 18:40:52] ERROR: failed to load configuration file '/usr/local/php/etc/php-fpm.conf' [17-Apr-2014 18:40:52] ERROR: FPM initialization failed failed
In the first step, please carefully write the configuration into the corresponding group, otherwise the above message will appear:
The code is as follows:
ERROR: [/usr/local/php/etc/php-fpm.conf:5] unknown entry ‘catch_workers_output'
The above is the detailed content of How to enable errors in php fpm. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



To solve the problem of lack of PHP-FPM in Ubuntu, specific code examples are required. In the Ubuntu system, installing and configuring PHP-FPM is a common operation, but sometimes the problem of missing PHP-FPM occurs during the installation process. This article details how to solve this problem and provides specific code examples to help you complete the installation and configuration. 1. Check whether PHP-FPM has been installed. First, use the following command to check whether PHP-FPM has been installed in the system: dpkg-l|gr

Methods to solve the problem of PHP7-FPM startup failure in Linux environment. When using Linux server to build a website or application, PHP7-FPM is a commonly used PHPFastCGI process manager. However, sometimes you encounter the problem that PHP7-FPM fails to start, which may cause the website to be unable to be accessed normally. In this article, we'll cover some common workarounds and provide specific code examples. I hope this information can help you quickly solve the problem of PHP7-FPM startup failure. examine

PHP7-FPM under Linux is a common PHPFastCGI process manager, which is usually used to handle the running of PHP programs. However, sometimes during the configuration or deployment process, you may encounter a situation where PHP7-FPM fails to start, causing the website to be unable to be accessed normally. In this case, we need to take some measures to deal with and solve the problem. 1. Check the error log. First check the error log of PHP7-FPM. Usually the error log is located at /var/log/php7-fpm.

Graceful restart GR is the abbreviation of Graceful Restart. It is a mechanism to ensure that forwarding services are not interrupted when the protocol is restarted. The core of the GR mechanism is that when a device restarts the protocol, it can notify its surrounding devices to maintain stable neighbor relationships and routes to the device within a certain period of time. After the protocol is restarted, peripheral devices assist it in synchronizing information (including various topology, routing and session information maintained by routing/MPLS-related protocols that support GR), so that the device can be restored to the state before the restart in the shortest possible time. state. There will be no route flapping during the entire protocol restart process, and there will be no change in the packet forwarding path. The entire system can forward data without interruption. This process is called a smooth restart.

For one of our web projects, due to the increase in new cities, the number of visits has increased and the pressure on the db has increased. As a business party that provides interfaces, a large number of "502" requests have been reported recently by downstream feedback. 502, badgateway, is usually an error in upstream (here is PHP). For PHP, the common cause of 502 is that the script execution exceeds the timeout setting time, or the timeout setting is too large, resulting in the PHP process not being released for a long time, and there are no idle workers. process to pick up guests. Our project is caused by the PHP execution time setting being too short. In this case, you can first increase the PHP execution time appropriately and ensure that 502 is cleared first. Optimization will cost more after all.

When solving the challenge of missing PHP-FPM in your Ubuntu system, you need to follow a series of steps to install and configure PHP-FPM. PHP-FPM (FastCGIProcessManager) is a process manager that handles dynamic page requests and can improve the performance and stability of PHP applications. The following details how to install and configure PHP-FPM on an Ubuntu system, with specific code examples to help solve this challenge. Step 1: Updating the system is in progress

nginx is different from apache. In apache, you can directly specify the error log of php, so that the error information during php execution is directly input into the error log of php, which can be easily queried. In nginx, things become like this: nginx only records access logs for page visits. There will be no php errorlog information. nginx sends the request for php to the php-fpmfastcgi process for processing. The default php-fpm will only output the error message of php-fpm, and the error log of php cannot be seen in the errorslog of php-fpm. The reason is that the configuration file php of php-fpm

It is common practice to use PHP7-FPM as the server-side script running environment on Linux servers, but sometimes you may encounter startup exceptions. This article will introduce some techniques for dealing with PHP7-FPM startup exceptions, and provide some specific code examples to help readers better solve the problem. 1. Check the configuration file. The configuration file of PHP7-FPM is usually located in the /etc/php/7.x/fpm/pool.d/ directory to ensure that the configurations in the configuration file are correct. Can make
