|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54051 output_buffering boolean values not interpreted correctly
Submitted: 2011-02-18 22:28 UTC Modified: 2021-10-12 12:50 UTC
Avg. Score:2.0 ± 1.0
Reproduced:0 of 0 (0.0%)
From: chealer at gmail dot com Assigned:
Status: Analyzed Package: PHP options/info functions
PHP Version: Irrelevant OS: Debian GNU/Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: chealer at gmail dot com
New email:
PHP Version: OS:


 [2011-02-18 22:28 UTC] chealer at gmail dot com
As reported in phpinfo() displays the value of output_buffering as "no value" instead of Off when it is set to Off. output_buffering is supposed to support boolean values:
; Output buffering is a mechanism for controlling how much output data
; (excluding headers and cookies) PHP should keep internally before pushing that
; data to the client. If your application's output exceeds this setting, PHP
; will send that data in chunks of roughly the size you specify.
; Turning on this setting and managing its maximum buffer size can yield some
; interesting side-effects depending on your application and web server.
; You may be able to send headers and cookies after you've already sent output
; through print or echo. You also may see performance benefits if your server is
; emitting less packets due to buffered output versus PHP streaming the output
; as it gets it. On production servers, 4096 bytes is a good setting for performance
; reasons.
; Note: Output buffering can also be controlled via Output Buffering Control
;   functions.
; Possible Values:
;   On = Enabled and buffer is unlimited. (Use with caution)
;   Off = Disabled
;   Integer = Enables the buffer and sets its maximum size in bytes.
; Note: This directive is hardcoded to Off for the CLI SAPI
; Default Value: Off
; Development Value: 4096
; Production Value: 4096

But if it is set to Off, its value becomes an empty string. If it is set to On, its value becomes 1.

I set the version to Irrelevant so the system would let me submit the report, but the version I verified this on is PHP 5.3.3.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-21 20:01 UTC]
-Status: Open +Status: Analyzed
 [2012-02-21 20:01 UTC]
Yes, this isn't completely consistent. An empty string is the same as Off. It 
doesn't display the same as the boolean flags in phpinfo() because it isn't a 
boolean since it can take numeric values. 0, "" and Off all mean the same thing 
here. So it is purely aesthetic, but we should still go through and clean this up 
at some point.
 [2021-10-12 12:50 UTC]
Related to bug #52168.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 07:01:34 2024 UTC