Currently the custom error handler of phpMyFaq sends all errors to the screen.
This is not very flexible and does not allow the errors to be send to the syslog and/or a log file.
Improve this by changing the error handler to respect the values: 'display_errors' and 'log_errors'.
In addition: use the error_log when the 'log_errors' variable is set in the php configuration.
Attached is a patch for this (0002-Repsect-the-values-of-dislpay_errors-and-log_errors.patch).
NOTE: this patch was originally written on 2.6.7. It is untested on the git HEAD.
[PATCH] Improve the error handler
Moderator: Thorsten
[PATCH] Improve the error handler
You do not have the required permissions to view the files attached to this post.
Re: [PATCH] Improve the error handler
Hi,
I cleaned your patch a little bit and added it phpMyFAQ 2.6.8. Thanks a lot!
bye
Thorsten
I cleaned your patch a little bit and added it phpMyFAQ 2.6.8. Thanks a lot!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: [PATCH] Improve the error handler
I noticed that I made a mistake in the patch...
My patch uses
which is not correct.
It should be:
or
My patch uses
Code: Select all
printf ($errorMessage);
It should be:
Code: Select all
printf ("%s", $errorMessage);
Code: Select all
print ($errorMessage);
Re: [PATCH] Improve the error handler
Hi,
yes, I fixed it. Thanks for the hint!
bye
Thorsten
yes, I fixed it. Thanks for the hint!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist