From: mp at icomme dot fr Operating system: FreeBSD 7.2 PHP version: 5.2.11 PHP Bug Type: Unknown/Other Function Bug description: error_log to specified file does not log time according to date.timezone
Description: ------------ When php.ini is configured with "error_log" to a specified file (not via syslog), PHP does not log date and time of records (errors, warnings, etc.) according to the "date.timezone" configured in php.ini, it's always recorded with GMT time. PHP (5.2.6) used to work correctly with this. OS and PHP have correct time zone : $ date Tue Sep 22 19:05:32 CEST 2009 ... time on OS is correctly configured : CEST = GMT+2 print date('r T'); print gmdate('r T'); ... respectivly returns : Tue, 22 Sep 2009 19:06:12 +0200 CEST Tue, 22 Sep 2009 17:06:12 +0000 GMT ... PHP correctly configured Box : FreeBSD 7.2-RELEASE (GENERIC) Apache/2.2.13 (Unix) PHP 5.2.11 Someone says (bug 45191) this bug has been fixed in CVS on May 2009, but 2 versions of the 5.2 branch had been released since this date, and the bug is still present. Reproduce code: --------------- # php.ini : ; Log errors to specified file. error_log = "/var/log/php/php-error.log" ; Defines the default timezone used by the date functions date.timezone = "Europe/Paris" # test.php : nonexistantfunction(); Expected result: ---------------- [22-Sep-2009 18:57:55] PHP Fatal error: Call to undefined function nonexistantfunction() in /usr/home/michel/public_html/plante.php on line 9 Actual result: -------------- [22-Sep-2009 16:57:55] PHP Fatal error: Call to undefined function nonexistantfunction() in /usr/home/michel/public_html/plante.php on line 9 -- Edit bug report at http://bugs.php.net/?id=49627&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49627&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49627&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49627&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49627&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49627&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49627&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49627&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49627&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49627&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49627&r=support Expected behavior: http://bugs.php.net/fix.php?id=49627&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49627&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49627&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49627&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49627&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49627&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49627&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49627&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49627&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49627&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49627&r=mysqlcfg