Home Backend Development PHP Problem How to enable error log in php fpm

How to enable error log in php fpm

Aug 28, 2020 pm 03:48 PM
error log

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].

How to enable error log in 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
Copy after login

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
Copy after login

3. Restart php-fpm

systemctl restart php-fpm
Copy after login

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to open error log in php How to open error log in php Mar 09, 2021 pm 05:26 PM

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? Summary of frequently asked questions about importing Excel data into Mysql: How to deal with error log problems encountered when importing data? Sep 10, 2023 pm 02:21 PM

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

Error log query method to solve win10 crash problem Error log query method to solve win10 crash problem Jan 08, 2024 am 11:49 AM

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

Handling errors and logs in PHP scripts Handling errors and logs in PHP scripts May 09, 2024 pm 05:18 PM

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.

Error handling techniques in JavaScript Error handling techniques in JavaScript Jun 16, 2023 am 11:57 AM

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

Use PHP arrays to implement online debugging and error logging functions Use PHP arrays to implement online debugging and error logging functions Jul 15, 2023 pm 11:33 PM

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

Error handling methods and FAQs for PHP email docking class Error handling methods and FAQs for PHP email docking class Aug 06, 2023 am 10:37 AM

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

Golang learning web application error log collection Golang learning web application error log collection Jun 24, 2023 am 09:11 AM

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

See all articles