php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55840 phpinfo() outputs differently if output_buffer is used
Submitted: 2011-10-03 19:33 UTC Modified: 2011-10-20 08:21 UTC
From: jamess at sharklasers dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.8 OS: WinXP SP3
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jamess at sharklasers dot com
New email:
PHP Version: OS:

 

 [2011-10-03 19:33 UTC] jamess at sharklasers dot com
Description:
------------
phpinfo() outputs differently than if its contents are being captured with output buffer.

Test script:
---------------
Actual result:
*Example1:
<?php
ob_start();
phpinfo();
ob_end_flush();
?>
*Example2:
ob_start();
phpinfo();
$i=ob_get_clean();
echo $i;
?>

Expected Result:
*Example 1:
<?php
phpinfo();
?>
*Example 2:
<?php
ob_start();
ob_end_flush();
phpinfo();
?>

Expected result:
----------------
* Apache Environment: HTTP_CACHE_CONTROL is not present.
* HTTP Headers Information: HTTP Request Headers: Cache-Control is not present.
* HTTP Headers Information: HTTP Response Headers: Keep-Alive, Connection, Transfer-Encoding, Content-Type are present.


Actual result:
--------------
* Apache Environment: HTTP_CACHE_CONTROL is present.
* HTTP Headers Information: HTTP Request Headers: Cache-Control is present.
* HTTP Headers Information: HTTP Response Headers: Keep-Alive, Connection, Transfer-Encoding, Content-Type are not present.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-20 08:21 UTC] mike@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Your browser sends Cache-Control if you reload the page.
 [2011-10-20 08:21 UTC] mike@php.net
-Status: Open +Status: Bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 08:01:32 2025 UTC