#50839 [Com]: log_errors + display_errors = bogus timezone warning in response entity

From: Date: Tue, 26 Jan 2010 06:31:29 +0000
Subject: #50839 [Com]: log_errors + display_errors = bogus timezone warning in response entity
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146943@lists.php.net to get a copy of this message
ID: 50839 Comment by: miqrogroove at gmail dot com Reported By: miqrogroove at gmail dot com Status: Open Bug Type: *Configuration Issues Operating System: Windows 2003 PHP Version: 5.3.1 New Comment: I also confirmed that any call to the mail() function results in two identical warnings on screen, and one in the log. Previous Comments: ------------------------------------------------------------------------ [2010-01-26 01:23:21] miqrogroove at gmail dot com A second way to describe the issue is that the error_log() function is throwing bogus errors. As in: <?php ini_set('error_reporting', -1); ini_set('display_errors', 1); ini_set('log_errors', 1); error_log('Hello World'); ?> This causes 'Hello World' to go to disk, and the bogus Warning to go to screen. I used a different example in OP to illustrate the fact that PHP is saying that the Warning was generated by any function whether or not it uses timezones in the first place. ------------------------------------------------------------------------ [2010-01-26 01:15:41] miqrogroove at gmail dot com Description: ------------ There is a situation where PHP will display errors but never log them. It almost seems as though error logging is causing errors now? Is that the most useless kind of feedback message ever? Warning errors are causing errors omgah barbeque. Reproduce code: --------------- <?php ini_set('error_reporting', -1); ini_set('display_errors', 1); ini_set('log_errors', 1); trigger_error('Hello', E_USER_ERROR); ?> Expected result: ---------------- Fatal error: Hello in test.php on line 7 Actual result: -------------- Warning: trigger_error() [function.trigger-error]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in test.php on line 7 Fatal error: Hello in test.php on line 7 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50839&edit=1

« previous php.bugs (#146943) next »