#41952 [Bgs]: Problem with PHP6 and Byte Order Mark
| From: | hedvall at gmail dot com | Date: | Wed, 11 Jul 2007 08:34:57 +0000 |
| Subject: | #41952 [Bgs]: Problem with PHP6 and Byte Order Mark | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114880@lists.php.net to get a copy of this message | ||
ID: 41952
User updated by: hedvall at gmail dot com
Reported By: hedvall at gmail dot com
Status: Bogus
Bug Type: Compile Warning
Operating System: Win2k SP4
PHP Version: 6CVS-2007-07-10 (snap)
New Comment:
Alright, this might not be a bug, but it worked in older versions and
the one of the comments on bug http://bugs.php.net/bug.php?id=22108 said
that the BOM won't be sent at all with PHP6 along with the Unicode
support. But yes, the documentation says that no header can't be sent
after any output, but this did work previously because most browsers
ignore the BOM completely, even if it's sent in the middle of the header
block.
Previous Comments:
------------------------------------------------------------------------
[2007-07-11 07:27:07] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2007-07-10 17:02:48] hedvall at gmail dot com
Description:
------------
After upgrading to the latest PHP6 build from 6CVS-2007-06-21 the
compiler no longer accepts the UTF-8 BOM (Byte Order Mark) to be sent
before the headers. It might be correct to not send the headers after
any other output but it hasn't caused any trouble with any newer browser
on any platform (win, mac, linux).
I always remove the BOM before the sites go live but when developing
it's easier to leave it there until the page is finished.
This is not a duplicate of 22108.
Reproduce code:
---------------
<?php
header("HTTP/1.0 404 Not Found");
?>
Expected result:
----------------
404 header sent without warning
Actual result:
--------------
Warning: Cannot modify header information - headers already sent by
(output started at [...]/header.php:1) in [...]/header.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41952&edit=1