View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019642 | mantisbt | administration | public | 2015-04-20 19:35 | 2020-01-20 05:55 |
Reporter | dregad | Assigned To | dregad | ||
Priority | low | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 2.21.0 | Fixed in Version | 2.21.0 | ||
Summary | 0019642: If log file is not writable, log_event() fails silently | ||||
Description | If the file specified in $g_log_destination is not writeable by the web server process, log_event() fail without any indication to the user. | ||||
Tags | No tags attached. | ||||
Hi, Thanks. |
|
Hello Kevin All contributions are welcome. Please fork our repository on Github [1], and send us a pull request against the master branch with your proposed fix. Suggested reading:
If you have any questions, I suggest you register on the developers mailing list [5] and send them that way, or ping us on gitter [6]. [1] https://github.com/mantisbt/mantisbt |
|
Hi, Thanks |
|
Basically log_event() should trigger an error when the specified log file is not writable. |
|
Hi, Thank You |
|
I'm not sure what you mean exactly by "logging screen", but displaying a warning on the user's screen is the way to go. |
|
MantisBT: master 6d288c64 2019-03-21 08:25 Details Diff |
Display error when Mantis log file is not writable Fixes 0019642 |
Affected Issues 0019642 |
|
mod - core/constant_inc.php | Diff File | ||
mod - core/logging_api.php | Diff File | ||
mod - lang/strings_english.txt | Diff File | ||
MantisBT: master c8d16e7d 2019-03-21 08:47 Details Diff |
New error_log_delayed() API function Encapsulates the logic to enqueue error messages for later display. Issue 0019642 |
Affected Issues 0019642 |
|
mod - core/error_api.php | Diff File | ||
MantisBT: master-2.21 1c1ffd3b 2019-05-05 08:34 Committer: GitHub Details Diff |
log_event() create log file if it does not exist (0001509) log_event() create log file if it does not exist This is a regression from issue 0019642. When MantisBT tries to write an event to a log file that does not already exist, a warning is printed and the file is not created even if PHP process has write access to the directory. The event is added to the PHP system log. Instead of relying on is_writable(), the code now calls error_log() with errors suppressed, then checks the result of the function call to determine if the operation was successful or not. Fixes 0025734 |
Affected Issues 0019642, 0025734 |
|
mod - core/logging_api.php | Diff File |