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

add logs the detailed error message in php #595

Merged
merged 3 commits into from
Aug 18, 2024

Conversation

ColdeZhang
Copy link
Contributor

It really takes me time to find out why i can't host web standalone with just "Failed to connect to database".

Then i added the log detail, everything just be cleared: NOTICE: PHP message: could not find driver

So I think it's necessary to log err details for solving problems...

Copy link
Member

@TBlueF TBlueF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, can we add this to the other errors thrown in this php-file as well, please? :)

@ColdeZhang
Copy link
Contributor Author

Actually, can we add this to the other errors thrown in this php-file as well, please? :)

That's a reasonable idea. I will made this PR modified soon.

@ColdeZhang ColdeZhang requested a review from TBlueF August 18, 2024 16:05
Copy link
Member

@TBlueF TBlueF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry,.. but we can not print the full error in the response that is actually sent back to the client, because the error could contain sensitive information.
What i meant was to still use the error_log() method you used in the first commit, just for every error, while still sending the generic error message back to the browser =)

@ColdeZhang
Copy link
Contributor Author

Ah sorry,.. but we can not print the full error in the response that is actually sent back to the client, because the error could contain sensitive information.

What i meant was to still use the error_log() method you used in the first commit, just for every error, while still sending the generic error message back to the browser =)

Oh, sry I forgot that. Wait a minute

Copy link
Member

@TBlueF TBlueF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! :)

@TBlueF TBlueF merged commit d5fe717 into BlueMap-Minecraft:master Aug 18, 2024
2 checks passed
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.

2 participants