Bug #73015 [Opn->Nab]: Timezone database is corrupt error message appears

From: Date: Fri, 30 Sep 2016 16:30:03 +0000
Subject: Bug #73015 [Opn->Nab]: Timezone database is corrupt error message appears
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204376@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73015&edit=1 ID: 73015 Updated by: derick@php.net Reported by: ozgurh at gmail dot com Summary: Timezone database is corrupt error message appears -Status: Open +Status: Not a bug Type: Bug Package: Date/time related Operating System: Linux PHP Version: 7.0.10 Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Using /usr/share/zoneinfo is a Linux distribution change to PHP, and not something we endorse or like. Please complain to your Linux distribution about this. Previous Comments: ------------------------------------------------------------------------ [2016-09-30 15:48:22] bruno dot macadre at univ-rouen dot fr Re, After searching a bit deeper, I found that this error occurs in a chrooted environment where /usr/share/zoneinfo is unreachable. In my case I use chroot directive in my FPM pool, so I tried to copy entire /usr/share/zoneinfo data into my Jail and the error disappear !! I don't know If you're in the same case than me but for me the problem is solved... ------------------------------------------------------------------------ [2016-09-30 15:37:31] bruno dot macadre at univ-rouen dot fr Hi, I've got the same problem on a fresh ubuntu 16.04 server install. Without date.timezone defined in /etc/php/7.0/fpm/php.ini nor in my pool definition, phpinfo(); works great and says : Default Timezone = Europe/Berlin date.timezone = No Value If I put a value to date.timezone in php.ini or pool conf file, the phpinfo(); hangs just before displaying Default Timezone. If I remove date.timezone value in php.ini and pool conf file and try this code : <?php date_default_timezone("Europe/Paris"); phpinfo(); ?> Instead of displaying phpinfo() I got this error message : Fatal error: date_default_timezone_set(): Timezone database is corrupt - this should *never* happen! in /www/index.php on line 3 Environment : Ubuntu Server 16.04 x64 PhP-FPM : PHP 7.0.8-0ubuntu0.16.04.2 (fpm-fcgi) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-0ubuntu0.16.04.2, Copyright (c) 1999-2016, by Zend Technologies PhP: PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-0ubuntu0.16.04.2, Copyright (c) 1999-2016, by Zend Technologies Regards, Bruno ------------------------------------------------------------------------ [2016-09-06 15:34:22] ozgurh at gmail dot com Here is the php.ini lines for date section. date/time support enabled "Olson" Timezone Database Version 0.system Timezone Database internal Default timezone UTC Directive Local Value Master Value date.default_latitude 31.7667 31.7667 date.default_longitude 35.2333 35.2333 date.sunrise_zenith 90.583333 90.583333 date.sunset_zenith 90.583333 90.583333 date.timezone UTC UTC ------------------------------------------------------------------------ [2016-09-05 00:32:37] ozgurh at gmail dot com Description: ------------ When I try to get date with $now = date('YmdHis'); command, sometimes (not all the time) I get PHP Fatal error: date(): Timezone database is corrupt - this should *never* happen! in line 78 error. When I restart php70-php-fpm everything just works perfect for a while (~ from 6 hours to 24 hours) then same error appears again (as I said not all the time it appears 1 in every 2 or 3 requests). I Installed php 5.6.25 on the same environment and everthing perfectly works. It's look like it appears only in 7.0.10 I have 8 servers with php 7.0.10 and 8 servers with php 5.6.25.I get this error message in all of the 7.0.10 servers and never seen this message in 5.6.25 servers. I installed php 7.0.10 with yum install. Environment : Amazon Linux 2016.03 release php 7.0.10 (php70-php-fpm) NginX 1.8.1 php -v : PHP 7.0.10 (cli) (built: Aug 27 2016 05:21:17) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.10, Copyright (c) 1999-2016, by Zend Technologies Expected result: ---------------- $now = date('YmdHis'); command should work with default php installation without to set anything. Actual result: -------------- PHP Fatal error: date(): Timezone database is corrupt - this should *never* happen! in line 78 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73015&edit=1

« previous php.bugs (#204376) next »