#47937 [Opn->Fbk]: headers_sent() reports 'true' after system() call in ob_start()
| From: | jani@php.net | Date: | Mon, 13 Apr 2009 18:01:45 +0000 |
| Subject: | #47937 [Opn->Fbk]: headers_sent() reports 'true' after system() call in ob_start() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135779@lists.php.net to get a copy of this message | ||
ID: 47937
Updated by: jani@php.net
Reported By: till@php.net
-Status: Open
+Status: Feedback
Bug Type: Output Control
Operating System: FreeBSD, MacOSX
PHP Version: 5.2.9
New Comment:
I can not reproduce this with Linux. Please try without the Suhosin
patch.
Previous Comments:
------------------------------------------------------------------------
[2009-04-09 13:55:04] till@php.net
Description:
------------
This is the php -v from one of the servers:
PHP 5.2.9 with Suhosin-Patch 0.9.7 (cli) (built: Apr 9 2009
03:31:34)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
This is another one (macosx):
PHP 5.2.9 (cli) (built: Apr 2 2009 16:07:08)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Xdebug v2.0.4, Copyright (c) 2002-2008, by Derick Rethans
Right after my system() call, headers were send. This works
differently in 5.2.6 and 5.2.8. I've scanned through
UPDATING/CHANGELOG but couldn't find anything.
I've disabled APC to make sure it's not connected.
php -m:
[PHP Modules]
ctype
date
dom
filter
iconv
libxml
mbstring
mcrypt
mysqli
pcre
Reflection
session
SimpleXML
sockets
SPL
standard
tidy
xml
zlib
Also reproduced with RC1 on 5.3:
PHP 5.3.0RC1 (cli) (built: Apr 9 2009 15:45:09)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
Reproduce code:
---------------
<?php
ob_start();
system('file -i -b /path/file.txt');
$contents = ob_get_contents();
ob_end_clean();
var_dump(headers_sent($file, $line), $file, $line);
Expected result:
----------------
headers_sent() should return false.
Actual result:
--------------
headers_sent() returns true, with empty $file and $line = 0.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47937&edit=1