Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Apache 500 internal server error, truncates logs that are too… #65

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

frankforte
Copy link

ChromePHP is meant to help developers debug. Ironically, it can cause a 500 internal server error when served from Apache if the logs are too large, which gives absolutely no information from the application about why it failed.

This commit checks the size of the header, and if it is too large, it removes some logs until it is small enough, first attempting to remove regular "status" logs, and if it is still too large, the rest of the logs. It even plays nice with the table log.

@hopeseekr
Copy link

This was addressed in the PR of my fork: PHPExpertsInc/chromephp#2.

@frankforte
Copy link
Author

frankforte commented May 15, 2019

@hopeseekr, I see that your PR clobbers all of the logs. This PR attempts to keep as many logs as possible while staying under the limit.

You might be interested in https://github.com/frankforte/quantumphp

It works with modern versions of Firefox. I find it is faster and I prefer how the console wraps tables, etc. compared to Chrome.

It can also combine logs that might be added in a loop, to prevent the logs getting large very quickly.

@peter279k
Copy link

@frankforte, thank you for your reply. this quantumphp you suggest seems to be good.

But it looks like it has been inactive/unmaintained for about few years.

Anyway, thank you for your recommended related package :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants