#49623 [Opn]: PHP shows deprication warning BEFORE compressed body
| From: | 3 at 14 dot by | Date: | Tue, 22 Sep 2009 16:11:26 +0000 |
| Subject: | #49623 [Opn]: PHP shows deprication warning BEFORE compressed body | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142688@lists.php.net to get a copy of this message | ||
ID: 49623
User updated by: 3 at 14 dot by
-Summary: PHP shows deprecation warning BEFORE compressed body
Reported By: 3 at 14 dot by
Status: Open
Bug Type: Output Control
Operating System: 2.6.28-15-generic #49-Ubuntu SMP
PHP Version: 5.3.0
New Comment:
typo
Previous Comments:
------------------------------------------------------------------------
[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