ID:               40429
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nicolas dot grekas+php at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Streams related
 Operating System: WIN
 PHP Version:      5.2.1
 New Comment:

Cannot reproduce with any of your examples.
Makes sure you're actually using 5.2.1 and not something old.


Previous Comments:
------------------------------------------------------------------------

[2007-02-10 12:34:13] nicolas dot grekas+php at gmail dot com

Description:
------------
Opening the php://output stream seams to flag the headers as sent,
event if output buffering is on. Consequently, any call to header()
fails where it shouldn't.

Affects any extension that uses streams.


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

ob_start();
$h = fopen('php://output', 'wb');
fclose($h);
ob_end_clean();

header('X-Foo: bar');

?>

Or

<?php

ob_start();
$dom = new DOMDocument;
$dom->save('php://output');
ob_end_clean();

header('X-Foo: bar');

?>

Expected result:
----------------
blank page

Actual result:
--------------
Warning: Cannot modify header information - headers already sent in
C:\[...]\test.php on line 8


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40429&edit=1

Reply via email to