Logging not working

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
gvajda
Posts: 5
Joined: 09 Feb 2022, 08:11

Logging not working

Post by gvajda »

Hi Everone,

I have mantis 2.25.2 schema ver 211 php ver 7.4.28 MariaDB 5.5.68
Site is reached via proxy server.

When trying to have logs about email sending, I get the following error in httpd error_log:
[client PROXY-IP:54370] MantisBT - The file specified in $g_log_destination "/var/www/cap_bugtracker/log/mantis.log" is not writable

I've moved the file under /var/www so it could be reached externally as well.
Access rights: -rwxrwxr-x
apache is the owner of the path and files.

The log configuration is the following:
$g_log_level = LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:/var/www/cap_bugtracker/log/mantis.log';

I've tried to use format $g_log_level = 'LOG_EMAIL_RECIPIENT'; but in this case httpd error_log is not getting populated at all.

Since the error_log entry starts with the IP of the proxy, is it a valid assumption from my end that the logging is attempted on the proxy server and of course the path is inaccessible via the local path?

Can you help me please with this?
Thank you in advance!
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Logging not working

Post by atrol »

gvajda wrote: 26 Mar 2022, 13:31 Since the error_log entry starts with the IP of the proxy, is it a valid assumption from my end that the logging is attempted on the proxy server
Logging is done on the system where the PHP process is runnning (where you installed MantisBT)
Please use Search before posting and read the Manual
gvajda
Posts: 5
Joined: 09 Feb 2022, 08:11

Re: Logging not working

Post by gvajda »

Hi all,

We could manage to solve the issue.
SELINUX blocked the webservice user from editing files on the given path, and the log was populating the error_log due to a typo in the config_inc.php.

Cheers,
Greg
Post Reply