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
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>
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:
3. Apache Error Log
If PHP is running in the Apache web server, errors may be logged to the Apache Error Log Medium:
4. Nginx error log
If PHP is running in the Nginx web server, errors may be logged to Nginx 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:
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!