Page 1 of 1
/var/log/httpd/ssl_error_log PHP Notice and Warning Messages
Posted: Tue Oct 19, 2021 7:39 am
by andyb4u
Hi,
We have noticed that the /var/log/httpd/ssl_error_log file is full of thousands of lines such as:
Code: Select all
[Mon Sep 27 03:38:02.018401 2021] [:error] [pid 13054] [client X.X.X.X:60192] PHP Notice: Trying to get property of non-object in /usr/local/nagiosxi/html/includes/dashlets/gauges/gauges.inc.php on line 310, referer: https://NAGIOS/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=SOMEHOST
[Mon Sep 27 03:38:02.018433 2021] [:error] [pid 13054] [client X.X.X.X:60192] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/dashlets/gauges/gauges.inc.php on line 310, referer: https://NAGIOS/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=SOMEHOST
The log file is nearly 900MB in size.
Are these messages an indication of an actual issue or can they be ignored?
Regards,
Andy
Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess
Posted: Tue Oct 19, 2021 7:58 am
by andyb4u
For info - we have also looked at
https://support.nagios.com/kb/article/n ... e-611.html and do not see any of the errors mentioned. The following are set in php.ini:
max_input_vars = 50000
memory_limit = 1024M
max_execution_time = 180
max_input_time = 180
Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess
Posted: Tue Oct 19, 2021 2:49 pm
by benjaminsmith
Hi Andy,
The following entry in the php.ini file will disable those notices. They advisory messages and do not indicate a fatal error.
Code: Select all
// Turn off Notices and Deprecated Warnings
error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE
Remember to re-start Apache after making any changes.
Thanks for pointing that out in the article, we are going to update our kb additional instructions.
Thanks,
Benjamin
Reference:
https://www.php.net/manual/en/errorfunc.constants.php
https://www.php.net/manual/en/function. ... orting.php
Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess
Posted: Thu Oct 21, 2021 4:29 am
by andyb4u
Hi Benjamin,
Thanks for that info. I made the change and do not see any 'PHP Notice' messages being logged anymore.
We are still getting some 'PHP Warning' messages being logged, such as:
Code: Select all
[Thu Oct 21 09:37:55.486035 2021] [:error] [pid 28087] [client X.X.X.X:51578] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/dashlets/gauges/gauges.inc.php on line 310, referer: https://NAGIOSXI/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=SOMEHOST
Should we expect see some PHP Warning messages, such as this, after making the change?
Regards,
Andy
Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess
Posted: Thu Oct 21, 2021 11:18 am
by benjaminsmith
Hi Andy,
Please change it to the following, and let me know if you see any more warning messages logged.
Code: Select all
// Turn off Notices and Deprecated Warnings
error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING
Remember to re-start Apache after making any changes.
Reference:
https://support.nagios.com/kb/article/t ... s-912.html
Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess
Posted: Fri Oct 22, 2021 3:05 am
by andyb4u
Hi Benjamin,
That has worked. I don't see any more PHP Warning or PHP Notice messages.
Thanks for your help.
Andy
Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess
Posted: Fri Oct 22, 2021 9:14 am
by benjaminsmith
Hi Andy,
Your welcome! We'll go ahead and close this out, but feel free to open another if you have any questions in the future.
Thanks,
Benjamin