/var/log/httpd/ssl_error_log PHP Notice and Warning Messages

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
andyb4u
Posts: 114
Joined: Tue Aug 15, 2017 1:58 am

/var/log/httpd/ssl_error_log PHP Notice and Warning Messages

Post 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
andyb4u
Posts: 114
Joined: Tue Aug 15, 2017 1:58 am

Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess

Post 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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess

Post 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.

Code: Select all

systemctl restart httpd
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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
andyb4u
Posts: 114
Joined: Tue Aug 15, 2017 1:58 am

Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess

Post 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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess

Post 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.

Code: Select all

systemctl restart httpd
Reference:
https://support.nagios.com/kb/article/t ... s-912.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
andyb4u
Posts: 114
Joined: Tue Aug 15, 2017 1:58 am

Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess

Post by andyb4u »

Hi Benjamin,

That has worked. I don't see any more PHP Warning or PHP Notice messages.

Thanks for your help.
Andy
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: /var/log/httpd/ssl_error_log PHP Notice and Warning Mess

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked