Thanks for the above -- turns out that a combination of stuff (one that some dummy forgot to un-comment some settings in
/etc/php.ini) led to the problem.
Maybe this might helps somebody else.
I was migrating
PhpGedView,
http://www.phpgedview.net/, a genealogy program, from Slackware 13.1 to 13.37 and kept getting warning messages like this:
Code:
18.05.2011 12:10:25 - 192.168.1.10 - Anonymous - ERROR 2: 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 'Am
erica/New_York' for 'EDT/-4.0/DST' instead; 0 Error occurred on in function date1 called from line 356 of file session.ph
p in function require_once2 called from line 75 of file config.php in function require3 called from line 31 of file editge
dcoms.php
Tuns out that simply un-commenting
Code:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = 'America/New_York'
in
/etc/php.ini doesn't do the trick (making the thing stop yammering about relying on the system's timezone settings); you also need to un-comment the latitude, longitude, sunrise-zenith and sunset-zenith settings. So, the appropriate lines in
/etc/httpd/php.ini need to look like this:
Code:
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = 'America/New_York'
; http://php.net/date.default-latitude
date.default_latitude = 31.7667
; http://php.net/date.default-longitude
date.default_longitude = 35.2333
; http://php.net/date.sunrise-zenith
date.sunrise_zenith = 90.583333
; http://php.net/date.sunset-zenith
date.sunset_zenith = 90.583333
Those values happen to be the default values (and I happen to live in the US Eastern time zone) but they appear to need to be un-commented for an application that uses time and date functions or you'll get yammered at (which writes all over the web page, making it somewhat difficult to use it).
This appears to be a new "feature" of PHP explained at
http://php.net/date.timezone with a list of supported time zones at
http://www.php.net/manual/en/timezones.php and a note to not use things like 'US/Eastern' as they only exist for backward compatibility at
http://www.php.net/manual/en/timezones.others.php. It seems that using a time zone such as 'US/Eastern' will disappear at some future release of PHP so it may make sense to just bite the bullet and change now to the new standard.
Now I should note that this particular application program would not work properly without the above settings;
PhpGedView is picky about sticking to PHP's rules; as always, YMMV.
Hope this helps some.