[Bug 680399] New: php5.3 in openSUSE 11.3+ has no mandatory date.timezone setting in default config
https://bugzilla.novell.com/show_bug.cgi?id=680399 https://bugzilla.novell.com/show_bug.cgi?id=680399#c0 Summary: php5.3 in openSUSE 11.3+ has no mandatory date.timezone setting in default config Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: All OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Apache AssignedTo: bnc-team-apache@forge.provo.novell.com ReportedBy: lang@b1-systems.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b12) Gecko/20110222 Firefox/4.0b12 Recent versions of php 5.3 as shipped with openSUSE 11.3, 11.4 and Factory print a warning message to screen when php.ini doesn't define date.timezone. This clutters up the output of suse tools like zypper or php5-pear even when everything goes right. Example output in the results section. I suggest setting date.timezone to UTC in the default config. Reproducible: Always Steps to Reproduce: 1. Install any recent openSUSE 11.3, 11.4 or factory 2. Run any php thing which triggers date() and related functions 3. See error and get angry Actual Results: 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 'Europe/Berlin' for 'CET/1.0/no DST' instead in PEAR/Registry.php on line 1012 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 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/php5/PEAR/PEAR/Registry.php on line 1012 Expected Results: no warning This can be fixed by setting ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = 'UTC' in both files /etc/php5/cli/php.ini (php5) and /etc/php5/apache/php.ini (apache2-mod_php5) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=680399 https://bugzilla.novell.com/show_bug.cgi?id=680399#c1 Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse-beta@cboltz.de AssignedTo|bnc-team-apache@forge.provo |crrodriguez@opensuse.org |.novell.com | --- Comment #1 from Christian Boltz <suse-beta@cboltz.de> 2011-07-14 23:05:25 CEST --- It would be even better to read TIMEZONE from /etc/sysconfig/clock (in %post) and use that in the PHP config. To avoid overwriting manual changes, the packaged php.ini should have a special marker that is replaced in %post, for example date.timezone = 'SET_IN_POSTINSTALL' which can then be replaced with (untested!) sed -i "/^date\.timezone =/ s¿SET_IN_POSTINSTALL¿$TIMETONE¿" \ etc/php5/apache2/php.ini # same for cli/php.ini Notes: - $TIMEZONE usually contains a slash, therefore I'm using ¿ as separator - I intentionally used "etc/..." instead of "/etc/..." - IIRC this should make it working in in normal and --root'ed installations (untested!) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com