[PHP-BUG] Bug #74312 [NEW]: Filter BOMs out of PHP output
[email protected] ("furun at arcor dot de")
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
From: furun at arcor dot de Operating system: Win7 PHP version: 7.0.17 Package: Unicode Engine related Bug Type: Bug Bug description:Filter BOMs out of PHP output Description: ------------ PHP send the BOM (before the tag "<?php") to the output. This is a source for some very strange buggy behavior, which are sometimes very difficult to find, because a developer searches errors first in the code it self and not in a mostly invisible BOM. (I searched a "bug" in a image creating script for long time, before i found the BOM-Bug in a third party plugin far away from the "buggy code". The common "Headers already sent" error caused by the BOM are still confusing, but easier to find then a corrupted binary file.) I would suggest that PHP filters every BOM from PHP output. (Or is there any reason not to do so i not know of?) Test script: --------------- (Use any file with BOM) -- Edit bug report at https://bugs.php.net/bug.php?id=74312&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74312&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74312&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74312&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74312&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74312&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74312&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74312&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74312&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74312&r=support Expected behavior: https://bugs.php.net/fix.php?id=74312&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74312&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74312&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74312&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74312&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74312&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74312&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74312&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74312&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74312&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74312&r=mysqlcfg