[ticket/17550] Log uncaught server errors to the PHP error log#6972
Open
ECYaz wants to merge 1 commit into
Open
[ticket/17550] Log uncaught server errors to the PHP error log#6972ECYaz wants to merge 1 commit into
ECYaz wants to merge 1 commit into
Conversation
Uncaught exceptions that result in an HTTP 500 response were rendered as the generic error page but never logged anywhere, making them impossible to diagnose. Log server errors (5xx) to the PHP error log from the kernel exception subscriber, including the message and stack trace; client errors such as 404 are intentionally left unlogged to avoid noise. PHPBB-17550
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uncaught exceptions that result in an HTTP 500 response were rendered as the generic error page but were never logged anywhere, so they could not be diagnosed (PHPBB-17550).
This logs server errors (HTTP 5xx) from
kernel_exception_subscriberto the PHP error log, including the exception message and stack trace. Client errors such as 404/403 are intentionally not logged, to avoid noise.error_log()is used rather than the database-backed log because the database may itself be unavailable during a 500.Note: the same gap exists in the analogous 3.3.x exception subscriber. I've targeted master because the ticket is filed against 4.0.0-a1 and the symptom is the Symfony 4.x error page, but I'm happy to provide a 3.3.x backport if the team prefers.
Checklist:
Tracker ticket:
https://tracker.phpbb.com/browse/PHPBB-17550