|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-09-05 00:32 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 13:00:01 2026 UTC |
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