How to enable error log in php fpm
php fpm method to enable error log: first modify the configuration in [php-fpm.conf]; then modify the configuration in [php.ini]; finally restart [php-fpm], the code is [systemctl restart php-fpm].
【Related learning recommendations: php graphic tutorial】
How to enable error logs in php fpm:
1. Modify the configuration in php-fpm.conf. If not, please add:
The code is as follows:
[global] error_log = log/php_fpm.log [www] catch_workers_output = yes
2. Modify the configuration in php.ini, if not, add:
The code is as follows:
log_errors = On error_log = log/php_error_log error_reporting=E_ALL&~E_NOTICE error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
3. Restart php-fpm
systemctl restart php-fpm
When PHP is executed When an error occurs, you can see the error log in "/usr/local/php/var/log/php_error_log"
Related learning recommendations: php programming (video)
The above is the detailed content of How to enable error log 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



How to open the error log in PHP: 1. Open the php.ini configuration file, find the "log_errors" option, and change the value of this option from "Off" to "On". 2. Use the ini_set() function to modify the PHP file, with the syntax "ini_set("log_errors", "On");".

Summary of frequently asked questions about importing Excel data into Mysql: How to deal with error log problems encountered when importing data? Importing Excel data into a MySQL database is a common task. However, during this process, we often encounter various errors and problems. One of them is the error log issue. When we try to import data, the system may generate an error log listing the specific information about the error that occurred. So, how should we deal with the error log when we encounter this situation? First, we need to know how

If we encounter a crash when using the win10 system, we can query the error log after restarting the system normally to find out what caused the crash, and then we can prescribe the right medicine. So how to query the error log, let’s take a look below. How to check the error log of win10 crash: 1. First find this computer on the desktop, right-click it and select "Manage". 2. Then find "System Tools" under Computer Management and expand it. 3. Then find the "Event Viewer" and expand it again. 4. Then click "Windows Log" and select the event category you want to view on the right. 5. Click on a category and we can see what errors occurred when the computer crashed. 6. Click on one of the errors and you can

Answer: In PHP, error_reporting and set_error_handler are used to handle errors, while error_log and syslog are used for logging. Detailed description: Error handling: Use error_reporting to set the error level to be reported. Use set_error_handler to customize the error handling function, which can record error information and take appropriate measures. Logging: Use error_log to record errors and log messages. Use syslog to log information messages. Practical case: Open a log file, and then set an error handling function, which writes error information to the log file.

JavaScript is a programming language widely used in web development. Its flexibility and ease of mastering make it very useful for developers. However, during the development process, errors in JavaScript may cause abnormal behavior of the code, affecting the user experience and application stability. Therefore, this article will introduce error handling techniques in JavaScript to help developers solve these problems. Try-Catch statement The Try-Catch statement is a commonly used

Using PHP arrays to implement online debugging and error logging functions Introduction When developing web applications, you often encounter the need for debugging and error logging in order to better understand the execution process of the program and locate problems. This article will introduce how to use PHP arrays to implement online debugging and error logging functions. 1. Debugging function Debugging is a method of diagnosing program problems by outputting variables or error messages. In PHP, we can use arrays to save debugging information and output it to the page. First, we can create a

PHP email docking class error handling methods and FAQ Introduction: With the rapid development of the Internet, email has become an indispensable part of people's lives and work. PHP, as a popular server-side scripting language, is widely used in developing and processing website-related businesses. Mail Integration is one of the common requirements in PHP development. This article will introduce some common email docking error handling methods and answer some common questions. 1. Error handling method when using P

With the continuous development of web applications, developers are paying more and more attention to the collection and analysis of application logs to quickly discover and solve problems. However, some developers may still have some confusion about the error log collection of Golang Web applications. This article will introduce how to use Go language-related libraries to correctly collect and record error logs of web applications. 1. Golang’s log library In Golang, the built-in log library is “log”, which provides some simple functions to
