|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44394 Last two bytes missing from output
Submitted: 2008-03-10 16:03 UTC Modified: 2008-03-12 02:46 UTC
From: weirdan at gmail dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 5.2.6RC2 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 - 30 = ?
Subscribe to this entry?

 [2008-03-10 16:03 UTC] weirdan at gmail dot com
It seems like a regression of - two last bytes missing from output when using ob_flush() + ob_end_clean(). ob_end_flush() works as expected though.

The same issue is observed on PHP 5.2.3 / Linux

Reproduce code:
$string = "<a href='a?q=1'>asd</a>";
output_add_rewrite_var('a', 'b');
echo $string;

Expected result:
<a href='a?q=1&a=b'>asd</a>

Actual result:
<a href='a?q=1&a=b'>asd</


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-11 22:31 UTC] weirdan at gmail dot com
not fixed on WinXP, tested with this script:
echo phpversion() . "\n";
$string = "<a href='a?q=1'>asd</a>";
output_add_rewrite_var('a', 'b');
echo $string;

C:\Windows\system32\cmd.exe /c .\php.exe q.php | more
<a href='a?q=1&a=b'>asd</
Hit any key to close this window...
 [2008-03-12 02:46 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Fixed in 5_3 and HEAD.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 13:01:24 2023 UTC