Apache Error: It is not safe to rely on the system’s timezone settings php.ini Cacti, wordpress, joomla, phpmyadmin, phpinfo, zabbix, drupal, symfony, cakephp, codeigniter bitrix CentOS
After Upgrading the PHP, following error message was coming in the httpd error_log log
PHP Error
#tail -f /var/log/httpd/error_log
[Fri Jul 23 17:15:31 2010] [error] [client ] PHP Warning: date() [function.date]: 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 ‘Asia/Calcutta’ for ‘IST/5.0/no DST’ instead in /IlohaMail/include/ryosimap.inc on line 117, referer:
Solution:
1. Edit the php.ini file and Set the correct time zone.
The default location of the file is /etc/php.ini
#vim /etc/php.ini
2. Search for ‘timezone’ in php.ini file and change it as show below
;date.timezone =
to
date.timezone = “America/New_York”
or whatever specific timezone you are in.
I have following timezone settings in /etc/php.ini
date.timezone='Asia/Karachi'
causing the above posted warnings. I then changed to following:
date.timezone="Asia/Karachi"
then issues got resolved.
The reason was the single quotes which was changed to double quotes in /etc/php.ini under date section.
Thanks for the advise & contributor.