Project

General

Profile

Actions

Bug #14513

closed

Improve error handling in ``status.php``

Added by Marcos M over 1 year ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Diagnostics
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.09
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

The status.php page is typically used when there's an issue with the system. If PHP errors are encountered while generating the diagnostic data, error details can be included as a separate file (e.g. _errors.txt).

For example, these errors are the result of a failure with fopen() - details of which could be caught (e.g. with error_get_last()).

[21-Jun-2023 17:58:10 Etc/UTC] PHP Fatal error:  Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /usr/local/www/status.php:145
Stack trace:
#0 /usr/local/www/status.php(145): fclose(false)
#1 /usr/local/www/status.php(197): doCmdT('Log-OpenVPN-Las...', '/usr/bin/bzcat ...', 'exec')
#2 /usr/local/www/status.php(499): execCmds()
#3 {main}
  thrown in /usr/local/www/status.php on line 145
[21-Jun-2023 17:58:10 Etc/UTC] PHP Fatal error:  str_ireplace(): Cannot use output buffering in output buffering display handlers in /usr/local/www/csrf/csrf-magic.php on line 161
[...]
[21-Jun-2023 18:51:53 Etc/UTC] PHP Fatal error:  Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /usr/local/www/status.php:145
Stack trace:
#0 /usr/local/www/status.php(145): fclose(false)
#1 /usr/local/www/status.php(197): doCmdT('Log-Filter-Last...', '/usr/bin/bzcat ...', 'exec')
#2 /usr/local/www/status.php(499): execCmds()
#3 {main}
  thrown in /usr/local/www/status.php on line 145
[21-Jun-2023 18:51:53 Etc/UTC] PHP Fatal error:  str_ireplace(): Cannot use output buffering in output buffering display handlers in /usr/local/www/csrf/csrf-magic.php on line 161

Actions

Also available in: Atom PDF