Package: php5
Version: 5.6.5+dfsg-1
Severity: minor

I am reporting an issue with the Ubuntu version of this package deliberately
with Debian, because the issue lies with the Debian-maintained system
timezone database patch.

use_embedded_timezonedb.patch changes the behavior of the php5 package such
that it reads timezone information from /usr/share/zoneinfo. Among other
files, it reads /usr/share/zoneinfo/zone.tab. On a system I use, this file
was erroneously unavailable due to chroot and not mapping the file properly.
This caused various PHP functions to malfunction with no error or an error
that was hard to debug.

new DateTimeZone('UTC') : Exception: 'Unknown or bad timezone (UTC)'
timezone_identifiers_list() : empty result

The patch does not emit any warning when /usr/share/zoneinfo/zone.tab can't
be read. I suggest adding a warning or error using the regular PHP error
logging functions.

The relevant code of the patch:

+static struct location_info **create_location_table(void)
...
+    fp = fopen(zone_tab, "r");
+    if (!fp) {
+        return NULL;
+    }

NULL is ignored silently in other parts of the code.

Kind regards,

Jorrit Schippers


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to