[ZBX-7423] Frontend does not display PHP errors that happen near the end of script execution Created: 2013 Nov 21  Updated: 2019 Dec 10

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.0rc2
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Pavels Jelisejevs (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: frontend, php
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-7075 Blank screen when Testing LDAP settings Closed

 Description   

Zabbix frontend uses a custom error handler to catch all of the error messages and to display them in a pretty way. The error messages are caught and stored in a global variable and displayed using the show_messages() call in page_footer.php:54. The problem is that this is the last call to show_messages(), and errors that happen after it or during the shutdown of the script will not be displayed. They custom error handler will also prevent them from being logged in the PHP error file.

One of the possible solutions is to restore the original PHP error handler after the last call to show_messages() to display and log all of these errors in a default way. It may also be possible to display these errors in a user-friendly way using register_shutdown_function().



 Comments   
Comment by richlv [ 2013 Dec 02 ]

(1) when fixing this, also test for ZBX-7075

Generated at Sat Apr 20 08:21:54 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.