php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #5960 Output buffering and headers
Submitted: 2000-08-04 12:40 UTC Modified: 2007-01-07 11:13 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: wico at cnh dot nl Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (04/08/2000) OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wico at cnh dot nl
New email:
PHP Version: OS:

 

 [2000-08-04 12:40 UTC] wico at cnh dot nl
I d like to see some new function in php working with output buffering and headers
i really like to change the headers that are send elsewhere in the script and/or by php


maybe you can make these functions:

$raw = ob_get_headers();
headers as the way the go to the client (separated by \n?)

$array = ob_get_headers_array();
$array like:
$headers[content-type] = "text/plain"

and ob_clean_headers
to put all the current headers in /dev/null

i can use the functions for:
1. the sessions i made in php
2. to compress pages as gzip

and i guess there a a lot of other options other can/will think about

caps (efnet/#php) started making these functions somethime but he run out of time before he could finsh the (he got it working for cgi without killing childs :)

i'm not a c programmer (it there where i 48 hours in a day i could learn it :)
so i'am asking i someone / you can make them please

since you can put headers (with outputbuffering on) after your html (and so are stored somewhere in memmory) i guess it would be to hard to change/clean them and so making those function

Anyway i would be real glad i someone could do this

script would look kinda this:
<?
  ob_start();
  header("content-type: text/html");

  ...

  $headers = ob_get_headers();
  Ob_Clean_Headers();'

  $headers[content-type] = "text/plain";
  //output new headers

  ...
?>


Tnx in advance

Greetz,

Wico

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-07 11:13 UTC] bjori@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

headers_list() is available as of PHP5.0.0
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Dec 04 19:00:01 2025 UTC