6.0.0-git
2019-03-19

[#9312] Horde breaks under php5.3 when alarms is configured /srv/www/htdocs/horde/lib/Horde/Date.php on line 537
Summary Horde breaks under php5.3 when alarms is configured /srv/www/htdocs/horde/lib/Horde/Date.php on line 537
Queue Horde Base
Queue Version 3.3.9
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester lang (at) b1-systems (dot) de
Created 2010-10-15 (3077 days ago)
Due
Updated 2010-10-19 (3073 days ago)
Assigned
Resolved 2010-10-19 (3073 days ago)
Milestone 3.3.10
Patch No

History
2010-10-19 16:51:12 Jan Schneider Comment #7
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 3.3.10
Reply to this comment
I still fixed this, because when using DateTime this is a fatal error, 
contrary to other places where PHP falls back to the timezone 
environment (which we set).
2010-10-19 16:49:41 CVS Commit Comment #6 Reply to this comment
Changes have been made in CVS for this ticket:

Avoid fatal errors when using DateTime with not properly configured 
PHP  5.2 (Bug #9312).
http://cvs.horde.org/diff.php/framework/Date/Attic/Date.php?rt=horder1=1.8.10.19r2=1.8.10.20ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?rt=horder1=1.515.2.627r2=1.515.2.628ty=u
2010-10-19 12:25:38 lang (at) b1-systems (dot) com Comment #5 Reply to this comment
when this value is set and alarms are configured, horde stops 
displaying the content area in options, but also in kronolith.

I'm still looking for the root cause.
2010-10-19 07:18:39 Jan Schneider Comment #4 Reply to this comment
I don't see a point to conditionally call a method that has been 
introduced with PHP 5.1 in a branch that still supports BC to PHP 4.3. 
Horde 4 already calls this method in an appropriate place of course.
2010-10-19 06:24:35 arjen+horde (at) de-korte (dot) org Comment #3 Reply to this comment
The solution is right in the error message.  This is not a Horde issue.
I beg to differ. I do agree that this is not a bug, but instead should 
be a feature request.

Only one of the ways to fix this, is to set the timezone value in 
php.ini. But for some people this may not be possible. Either because 
they don't have access to the php.ini file or because they are running 
Horde on a shared server located in a different timezone.

It would be much more convenient if Horde would use the 
date_default_timezone_set() function to set the timezone and allow 
changing this in the configuration.
2010-10-18 21:30:27 Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
The solution is right in the error message.  This is not a Horde issue.
2010-10-15 18:35:28 Ralf Lang (B1 Systems GmbH) Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Horde breaks under php5.3 when alarms is configured /srv/www/htdocs/horde/lib/Horde/Date.php on line 537
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
When activating Horde_Alarms mysql logging, the content window of all 
horde apps kept empty white with the warning:

Fatal error: Uncaught exception 'Exception' with message 
'DateTime::__construct(): 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 
'CEST/2,0/DST' instead' in 
/srv/www/htdocs/horde/lib/Horde/Date.php:537 Stack trace: #0 
/srv/www/htdocs/horde/lib/Horde/Date.php(537): DateTime->__construct() 
#1 /srv/www/htdocs/horde/lib/Horde/Date.php(588): 
Horde_Date->format('Y-m-d H:i:s') #2 
/srv/www/htdocs/horde/lib/Horde/Alarm/sql.php(143): 
Horde_Date->sqlDateTime() #3 
/srv/www/htdocs/horde/lib/Horde/Alarm.php(275): 
Horde_Alarm_sql->_list('admin', Object(Horde_Date)) #4 
/srv/www/htdocs/horde/lib/Horde/Alarm.php(321): 
Horde_Alarm->listAlarms('admin', NULL, true, true) #5 
/srv/www/htdocs/horde/lib/Horde/Notification.php(209): 
Horde_Alarm->notify('admin') #6 
/srv/www/htdocs/horde/turba/templates/menu.inc(16): 
Notification->notify(Array) #7 
/srv/www/htdocs/horde/turba/add.php(72): require('/srv/www/htdocs...') 
#8 {main} thrown in /srv/www/htdocs/horde/lib/Horde/Date.php on line 537

Setting the value in php.ini did not help.

Saved Queries