date.timezone error in error_log

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jrmartin
Posts: 46
Joined: Mon Aug 08, 2011 6:55 pm

date.timezone error in error_log

Post by jrmartin »

I changed the /etc/php.ini file
; http://www.php.net/manual/en/datetime.c ... e.timezone
; date.timezone = Pacific/PST
date.timezone = America/Los_Angeles

however I am still getting these in my /var/log/httpd/error_log every minute or so.. How can I adjust this so it is proper? Thanks!
Jeff


[Fri Sep 23 15:56:47 2011] [error] [client 159.119.105.96] 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nadc-nag-p01/nagiosxi/
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: date.timezone error in error_log

Post by lmiltchev »

Did you restart the apache after you edited your php.ini file? If you forgot to do so, run:

Code: Select all

# service httpd stop
# service httpd start
You can also try to "bring your system time up to date" by:

Code: Select all

# yum install ntp
# ntpdate pool.ntp.org
You can also add this to your crontab:

Code: Select all

# crontab -e
For example, if you want to run it every day at 9:30, you can add this line to your crontab:

Code: Select all

# 30 9 * * * /usr/sbin/ntpdate pool.ntp.org
Be sure to check out our Knowledgebase for helpful articles and solutions!
jrmartin
Posts: 46
Joined: Mon Aug 08, 2011 6:55 pm

Re: date.timezone error in error_log

Post by jrmartin »

Thanks.. yes I forgot to restart httpd... that fixed it..
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: date.timezone error in error_log

Post by lmiltchev »

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