Open mattpascoe opened 11 years ago
for now I suspect you can put a 'data.timezone' setting in the php.ini to bypass this error. Need to determine a clean way of handling this.
There's nothing to work around here since it's not an application specific issue. PHP requires the timezone to be explicitely defined since version 5.1.0. The behaviour you describe is documented here -> http://php.net/manual/en/function.date-default-timezone-set.php
Quote:
Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the timezone isn't valid, and/or a E_WARNING message if using the system settings or the TZ environment variable.
I'm inclined to do something like this: http://php.net/manual/en/function.date-default-timezone-set.php#113864
This way ONA will use the date_default_timezone_set function to set things properly but use a system level setting for the proper value. I don't want to have users explicitly set this in some ONA config somewhere.
Otherwise, bottom line is, people just need to configure their environment properly :)
I just updated my RedHat Enterprise Linux server 6 ONA server to the latest version of PHP (5.3.3-22.el6), using the latest ONA and build_bind 1.5
I keep having the following errors fill up the apache error log, and it seems unhappy about something in the build_bind module.
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 'Asia/Jayapura' for 'CST/9.0/no DST' instead in /opt/ona/www/modules/build/build_bind.inc.php on line 394
I'm having to flush my logs out or it'll fill my /var to capacity, and tune PHP to show less errors.
I figure you can probably fix the issue though.