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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

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

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post by tmcdonald »

You will want to set the PHP timezone as per this doc:

http://assets.nagios.com/downloads/nagi ... m_Time.pdf
Former Nagios employee
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

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

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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?
Former Nagios employee
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

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

Post 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
$ 
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post by Box293 »

New York needs to be New_York

Code: Select all

date.timezone = America/New_York
Restart httpd after changing this.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

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

Post by vijilants »

Well done and thank you !!!!

That fixed it !
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

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