Sunday, July 5, 2015

Apache: Not safe to rely on the system's timezone settings


Unable to access web mail or page



Error Message 

Check the HTTP log error message.
tail -F /var/log/httpd/error_log

Tue Aug 06 11:42:25 2013] [error] [client 192.168.2.54] PHP Warning:  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 /var/www/IlohaMail/include/ryosimap.inc on line 106, referer: http://201.110.65.78/index.php


 
Task 1
 Update time zone data.
Yum upgrade tzdata

Task 2
 Take backup.
mv /etc/localtime /etc/localtime.BAK

Task 3
Copy the time zone info.
cp -rp /usr/share/zoneinfo/Asia/Colombo /etc/localtime

 
Task4
  
Check the date.
 Date

If the date incorrect please set the correct time
 Date –s” Tue Aug  6 13:54:43 IST 2014”


Task5

vim /etc/php.ini

1. Locate the php.ini file - the default location is etc/php.ini

vim /etc/php.ini

2. Search for 'timezone' in php.ini file

3. Change

date.timezone =
date.timezone = "Asia/Colombo"
 "whatever specific timezone you are in"





Comments System

Disqus Shortname