View Issue Details

IDProjectCategoryView StatusLast Update
0025734mantisbtadministrationpublic2020-02-25 10:59
Reporterdregad Assigned Todregad  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.21.0 
Target Version2.21.1Fixed in Version2.21.1 
Summary0025734: LOGFILE_NOT_WRITABLE error triggered if file does not exist
Description

When MantisBT tries to write an event to a log file that does not already exist, a warning is printed The file specified in $g_log_destination "/path/to/mantis.log" is not writable and the file is not created even if PHP process has write access. The event is added to the PHP system log.

This is a regression introduced by 0019642, as the code only checks that the target file is writable.

TagsNo tags attached.

Relationships

related to 0019642 closeddregad If log file is not writable, log_event() fails silently 
has duplicate 0025366 closeddregad SYSTEM WARNING - error_log problem 
related to 0026614 closeddregad SOAP: User Credentials appear in plain text in error log 

Activities

Related Changesets

MantisBT: master-2.21 1c1ffd3b

2019-05-05 08:34

dregad

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