Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#6101 - Timezone Database is corrupt in PHP

Attached to Project: Arch Linux
Opened by Alper Kanat (T-u-N-i-X) - Friday, 29 December 2006, 12:03 GMT
Last edited by Roman Kyrylych (Romashka) - Friday, 09 February 2007, 12:02 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date 2006-12-31
Percent Complete 100%
Votes 0
Private No

Details

I'm working on this error for days right now, talked to so many people in IRC but couldn't find a solution.. I hope that a new revision of PHP will solve it..

When I write

<?php echo date("l"); ?>

on an empty single PHP file, it prints this error:

Fatal error: date() [<a href='function.date'>function.date</a>]: Timezone database is corrupt - this should *never* happen! in /home/tunix/public_html/deneme.php on line 1
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Thursday, 08 March 2007, 08:07 GMT
Reason for closing:  Fixed
Additional comments about closing:  No response from reporter. Assuming fixed with the latest PHP and/or glibc.
Comment by Claudio Riva (Firetux) - Friday, 29 December 2006, 12:16 GMT
I'm not able to reproduce this problem...the code you suggested returns a white page with "Friday".
What version of php do you have? My version is php 5.2.0-1 taken from current repository
Comment by Jens Adam (byte) - Friday, 29 December 2006, 12:48 GMT
What he forgot to tell: He's using a turkish locale and timezone.
Comment by Alper Kanat (T-u-N-i-X) - Friday, 29 December 2006, 16:59 GMT
Sorry that I forgot to tell that I'm using Turkish locale and timezone.. Here is what I use.. I've read in the Changelog that I should either change date.timezone variable in /etc/php.ini or set the TZ system variable.. But no chance.. :(

[18:57] (tunix@penguix ~)$ locale
LANG=tr_TR.UTF-8
LC_CTYPE="tr_TR.UTF-8"
LC_NUMERIC="tr_TR.UTF-8"
LC_TIME="tr_TR.UTF-8"
LC_COLLATE="tr_TR.UTF-8"
LC_MONETARY="tr_TR.UTF-8"
LC_MESSAGES="tr_TR.UTF-8"
LC_PAPER="tr_TR.UTF-8"
LC_NAME="tr_TR.UTF-8"
LC_ADDRESS="tr_TR.UTF-8"
LC_TELEPHONE="tr_TR.UTF-8"
LC_MEASUREMENT="tr_TR.UTF-8"
LC_IDENTIFICATION="tr_TR.UTF-8"
LC_ALL=tr_TR.UTF-8

--------------

[18:57] (tunix@penguix ~)$ echo $TZ
Europe/Istanbul

--------------

; Defines the default timezone used by the date functions
date.timezone = Europe/Istanbul
Comment by Alper Kanat (T-u-N-i-X) - Friday, 29 December 2006, 23:36 GMT
I just found out that it occurs only when I manually restart httpd by the command: /etc/rc.d/httpd restart

If I restart the whole system, the problem doesn't occur.. Is there a solution for that ?
Comment by Alper Kanat (T-u-N-i-X) - Saturday, 30 December 2006, 00:23 GMT
But the problem continues with PHP:

[02:22] (tunix@kulupler ~)$ php deneme.php

Fatal error: date(): Timezone database is corrupt - this should *never* happen! in /home/tunix/deneme.php on line 1

I attach the strace output of the error..
   php.txt (27.4 KiB)
Comment by Roman Kyrylych (Romashka) - Thursday, 11 January 2007, 13:32 GMT
From PHP 5.2.1RC1 changelog:
- Updated timezone database to version 2006.16
Maybe this will fix your problem.
Comment by Roman Kyrylych (Romashka) - Friday, 16 February 2007, 16:11 GMT
Also glibc-2.5-4 now includes updated timezone DB.
Please report if this bug is fixed.

Loading...