Page 1 of 1

Large error log building up in /var/log/httpd after upgrade

Posted: Fri Nov 07, 2014 9:15 am
by vijilants
Hi ,

My system is Nagios XI 2014R1.5. After the upgrade to this version I have noticed that the /var/log/httpd/error_log is very large and cotinually logging up this type of error:

Code: Select all

[Fri Nov 07 09:06:44 2014] [error] [client 192.168.48.4] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 103, referer: http://192.168.42.3/nagiosxi/includes/components/birdseye/birdseye.php
This error comes up for all different cleint IP addresses. What is causing it and how do I fix it ?

Many Thanks

Re: Large error log building up in /var/log/httpd after upgr

Posted: Fri Nov 07, 2014 10:07 am
by tmcdonald
You will want to set the PHP timezone as per this doc:

http://assets.nagios.com/downloads/nagi ... m_Time.pdf

Re: Large error log building up in /var/log/httpd after upgr

Posted: Fri Nov 07, 2014 12:15 pm
by vijilants
I tried that as you suggested but the errors are still streaming out at a rate of knots:

Code: Select all

[Fri Nov 07 12:13:09 2014] [error] [client 192.168.48.4] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 103, referer: http://192.168.42.3/nagiosxi/includes/components/birdseye/birdseye.php

Re: Large error log building up in /var/log/httpd after upgr

Posted: Fri Nov 07, 2014 12:26 pm
by tmcdonald
Did you make sure to restart httpd after making the changes?

Can you post the output of the following?

Code: Select all

grep "date.time" /etc/php.ini
Did you also change the /etc/localtime file?

Re: Large error log building up in /var/log/httpd after upgr

Posted: Mon Nov 10, 2014 4:31 am
by vijilants
Yes,

Httpd was restarted and /etc/localtime is correct. I followed the instructions to the word.

Here is the output you requested:

Code: Select all

$ grep "date.time" /etc/php.ini
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = America/New York
$ 

Re: Large error log building up in /var/log/httpd after upgr

Posted: Mon Nov 10, 2014 5:17 am
by Box293
New York needs to be New_York

Code: Select all

date.timezone = America/New_York
Restart httpd after changing this.

Re: Large error log building up in /var/log/httpd after upgr

Posted: Tue Nov 18, 2014 8:33 am
by vijilants
Well done and thank you !!!!

That fixed it !

Re: Large error log building up in /var/log/httpd after upgr

Posted: Tue Nov 18, 2014 11:36 am
by slansing
Awesome! Glad to hear that solved it. For future reference you should be able to change this in the web interface under Admin > Manage System Settings as well.