#49623 [Bgs]: PHP shows deprecation warning BEFORE compressed body
| From: | 3 at 14 dot by | Date: | Tue, 22 Sep 2009 22:05:27 +0000 |
| Subject: | #49623 [Bgs]: PHP shows deprecation warning BEFORE compressed body | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142730@lists.php.net to get a copy of this message | ||
ID: 49623
User updated by: 3 at 14 dot by
Reported By: 3 at 14 dot by
Status: Bogus
Bug Type: Output Control
Operating System: 2.6.28-15-generic #49-Ubuntu SMP
PHP Version: 5.3.0
New Comment:
Is it possible at least to show a warning in the compressed part, not
before so that browsers would behave much nicer?
It is really confusing, and if one have no idea how to sniff HTTP
traffic, it might eat huge amount of time to figure out the cause.
Previous Comments:
------------------------------------------------------------------------
[2009-09-22 20:34:31] jani@php.net
That's quite expected and unfixable.
------------------------------------------------------------------------
[2009-09-22 16:18:31] sjoerd@php.net
Thank you for your bug report.
That PHP shows a warning even though error reporting is disabled sounds
like bug #49362, "Deprecated php.ini options warnings output even with
display_errors=off".
------------------------------------------------------------------------
[2009-09-22 16:11:25] 3 at 14 dot by
typo
------------------------------------------------------------------------
[2009-09-22 13:32:23] 3 at 14 dot by
Description:
------------
I have set Error_Reporting(0) both in the script & in the php.ini.
I have an PHPBB forum (3.0.6) with zlib compression turned on.
Most of the warnings are gone, but in some cases (when some data is
sent via POST), I am still getting a Notice "<b>date(): It is not safe
to rely on the system's timezone settings.", and it is printed BEFORE
compressed page body, so that browser reports broken encoding.
After disabling zlib compression browser started to show notice and
page content. After setting date.timezone in php.ini Notice is gone.
Reproduce code:
---------------
Install PHPBB 3.0.6: turn zlib compression = on, make sure to unset
date.timezone in php.ini. Then try to reply to a private message.
Expected result:
----------------
No notices on the screen, no "broken encoding"
Actual result:
--------------
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 22 Sep 2009 13:09:15 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Expires: 0
Last-Modified: Tue, 22 Sep 2009 13:09:15 GMT
Cache-Control: private, no-cache="set-cookie"
Pragma: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 3181
<b>[phpBB Debug] PHP Notice</b>: in file
<b>/includes/functions_messenger.php</b> on line <b>390</b>:
<b>date():
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 'Europe/Moscow' for
'MSD/4.0/DST' instead</b><br />
.............n.8...
V.&I[[..\j[..4.)..L..Y.E@I....U....
.Cv_...%{.)..%i.S#.E...d....>....9.t,..w./.............3..o../H..O.....u._9...N..;....^[fSw..{.T:.V<...i.:tF..ar..Dy[.t.<yb.....s..."h2.............h8j6.1..
........2.,.-.H.C...hv.]d2 AD3...n|.:v.;........[here goes the rest of
the compressed page]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49623&edit=1