|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-01-12 09:08 UTC] olemarkus at gentoo dot org
Description: ------------ PHP error log no longer respects timezone and always logs in UTC. Setting error_log to a filesystem path and date.default_timezone to e.g Europe/Oslo gives the following log lines in 5.3.8: [12-Jan-2012 10:02:38] PHP Notice: Undefined variable: foo in /home/htdocs/index.php on line 3 [12-Jan-2012 10:02:38] PHP Fatal error: Call to a member function bar() on a non-object in /home/htdocs/index.php on line 3 While in 5.3.9 you get: [12-Jan-2012 09:06:00 UTC] PHP Notice: Undefined variable: foo in /home/htdocs/index.php on line 3 [12-Jan-2012 09:06:00 UTC] PHP Fatal error: Call to a member function bar() on a non-object in /home/htdocs/index.php on line 3 Also see downstream bug: https://bugs.gentoo.org/show_bug.cgi?id=398445 Patchesbug60723.patch (last revision 2012-09-21 03:17 UTC by laruence@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 16:00:02 2025 UTC |
I have the same problem. The "localtime" argument passed to the php_format_date() function was changed from 1 to 0 between 5.3.8 and 5.3.9. Did it cause the problem? In /[svn]/php/php-src/branches/PHP_5_3/main/main.c *revision 319750, line 602: error_time_str = php_format_date("d-M-Y H:i:s", 11, error_time, 1 TSRMLS_CC); *revision 319823, line 602: error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC);Same: PHP 5.3.10 with Suhosin-Patch (cli) (built: Mar 14 2012 11:01:12) (DEBUG) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAcceleratorThe merit which makes this message UTC fixation is not known. How about changing in this way? ---- in main/main.c -error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC); +error_time_str = php_format_date("d-M-Y H:i:s T", 13, error_time, 1 TSRMLS_CC); ---- ---- output(date.timezone='Asia/Tokyo') [06-Jun-2012 13:54:12 JST] foo ----Don't see the fix in Debians testing packages (specifically 5.4.4), still seeing the UTC time instead of the local time: # apt-cache policy php5 php5: Instalados: 5.4.4-13 Candidato: 5.4.4-13 Tabla de versión: 5.5.0~alpha4-1 0 40 http://ftp.de.debian.org/debian/ experimental/main i386 Packages *** 5.4.4-13 0 500 http://ftp.de.debian.org/debian/ testing/main i386 Packages 50 http://ftp.de.debian.org/debian/ unstable/main i386 Packages 100 /var/lib/dpkg/status 5.3.3-7+squeeze14 0 500 http://security.debian.org/ squeeze/updates/main i386 Packages 500 http://ftp.de.debian.org/debian/ stable/main i386 Packages From the log file: [25-Feb-2013 11:05:46 UTC] PHP Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/php/MDB2.php on line 390I can confirm that the problem persist on Debian testing # apt-cache policy php5 php5: Installed: 5.4.4-14 Candidate: 5.4.4-14 Version table: *** 5.4.4-14 0 500 http://mirrors.gandi.net/debian/ wheezy/main amd64 Packages 100 /var/lib/dpkg/status # tail -1 error.log [07-Apr-2013 11:30:56 UTC] PHP Strict Standards ...