Where is the error log of php?

WBOY
Release: 2024-03-26 09:50:02
Original
690 people have browsed it

The location of the PHP error log depends on the server configuration, but is usually located in one of the following locations: Apache:/var/log/apache2/error.logNginx:/var/log/nginx/error.logPHP- FPM:/var/log/php-fpm.log

Where is the error log of php?

PHP Error Log Location

PHP Error Log Normal Stored in the following location:

1. Path to error_log configuration

You can specify a custom error log file path using the error_log configuration directive.

<code class="php">error_log("/var/log/php_errors.log");</code>
Copy after login

2. System log

If a custom error log is not configured, errors will be logged to the system log. The specific path varies by operating system:

  • Linux: /var/log/syslog
  • Windows: /Windows/System32/ winevt/Logs/Application.evtx

3. Apache Error Log

If PHP is running in the Apache web server, errors may be logged to the Apache Error Log Medium:

  • Linux: /var/log/apache2/error.log
  • Windows: /Program Files/Apache Software Foundation /Apache2.4/logs/error.log

4. Nginx error log

If PHP is running in the Nginx web server, errors may be logged to Nginx error log:

  • Linux: /var/log/nginx/error.log
  • Windows: /Program Files/ Nginx/logs/error.log

5. PHP-FPM error log

If PHP is run using PHP-FPM (FastCGI Process Manager), error May be logged to the PHP-FPM error log:

  • Linux: /var/log/php-fpm.log
  • Windows:/Program Files/PHP/logs/php-fpm.log

The above is the detailed content of Where is the error log of php?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template