From:             eero at ping-viini dot org
Operating system: Linux 2.4,2.6,2.0
PHP version:      4.3.2
PHP Bug Type:     Output Control
Bug description:  output control fails

Description:
------------
Output control fails.

Reproduce code:
---------------
<?php

ob_start();
session_name("session_name");
session_start();
$bar = "foo";
session_register("bar");
$bar = "fooo";

echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
        <html>
        <head>
                <title>Bug</title>
        </head>
        <body>
        <a href="bug.php?attribute=not_used">Link</a>
        <form>
';

ob_start();

echo '
        <a href="bug.php?attribute=not_used">Link</a>
        abcdefghijklmnopqrstu<br/>
        abcdefghijklmnopqrstu<br/>
        <input type="text" size="30"
value="texttexttexttexttexttexttexttexttext
texttexttext"/><br/>
        1234567890<br/>
        1234567890<br/>
';

ob_flush();

echo '
        </form>
        </body>
        </html>
';

$size=ob_get_length();
header("Content-Length: ".$size); // Now Content-Length does not match.

ob_end_flush();

?>



-- 
Edit bug report at http://bugs.php.net/?id=26646&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26646&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26646&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26646&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26646&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26646&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26646&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26646&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26646&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26646&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26646&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26646&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26646&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26646&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26646&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26646&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26646&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26646&r=float

Reply via email to