Skip to content

The error_log directive in /usr/local/etc/php/conf.d/error-logging.ini does not make any difference #595

@siddjain

Description

@siddjain

The wordpress:php7.4-fpm-alpine image comes with following file. ref:

bash-5.0# cat /usr/local/etc/php/conf.d/error-logging.ini
error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = /dev/stderr
log_errors_max_len = 1024
ignore_repeated_errors = On
ignore_repeated_source = Off
html_errors = Off

According to official PHP documentation:

message is sent to PHP's system logger, using the Operating System's system logging mechanism or a file, depending on what the error_log configuration directive is set to. This is the default option.

except that we haven't seen this work in practice. We changed the error_log to /var/www/html/wp-content/test.log but log messages are still written to /var/www/html/wp-content/debug.log which is the default location of WP_DEBUG_LOG. we thought maybe this is happening because the file does not exist so we created the file and even chown the permissions to make www-data the owner but still no luck. Has anyone experienced this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions