|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-02-11 09:37 UTC] tony2001@php.net
  [2007-02-19 01:00 UTC] php-bugs at lists dot php dot net
  [2007-03-21 14:17 UTC] nicolas dot grekas+php at gmail dot com
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
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