ID:               40429
 User updated by:  nicolas dot grekas+php at gmail dot com
 Reported By:      nicolas dot grekas+php at gmail dot com
-Status:           No Feedback
+Status:           Closed
 Bug Type:         Streams related
 Operating System: WIN
-PHP Version:      5.2.1
+PHP Version:      5.1.2
 New Comment:

Sorry, I was experimenting the bug in PHP 5.1.2, not 5.2.1...


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

[2007-02-19 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2007-02-11 09:37:08] [EMAIL PROTECTED]

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

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

[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