View Issue Details

IDProjectCategoryView StatusLast Update
0025734mantisbtadministrationpublic2019-06-14 02:39
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_logdestination "/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 

Activities

Related Changesets

MantisBT: master-2.21 1c1ffd3b

2019-05-05 12:34:16

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

Issue History

Date Modified Username Field Change
2019-05-04 06:31 dregad New Issue
2019-05-04 06:31 dregad Status new => assigned
2019-05-04 06:31 dregad Assigned To => dregad
2019-05-04 06:31 dregad Issue generated from: 0019642
2019-05-04 06:31 dregad Relationship added related to 0019642
2019-05-04 06:57 dregad Note Added: 0062024
2019-05-05 12:34 dregad Changeset attached => MantisBT master-2.21 1c1ffd3b
2019-05-05 12:34 dregad Status assigned => resolved
2019-05-05 12:34 dregad Resolution open => fixed
2019-05-05 13:56 atrol Fixed in Version => 2.21.1
2019-06-14 02:39 vboctor Status resolved => closed