php.net |  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
Votes:2
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 31 = ?
Subscribe to this entry?

 
 [2011-02-18 22:28 UTC] chealer at gmail dot com
Description:
------------
As reported in http://bugs.php.net/bug.php?id=29575 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
; http://php.net/output-buffering

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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-21 20:01 UTC] rasmus@php.net
-Status: Open +Status: Analyzed
 [2012-02-21 20:01 UTC] rasmus@php.net
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] cmb@php.net
Related to bug #52168.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 03:01:30 2024 UTC