php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23679 PHP does not protect output buffers created in configs from the script
Submitted: 2003-05-18 04:40 UTC Modified: 2003-05-18 07:25 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ngaugler at ngworld dot net Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.1 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ngaugler at ngworld dot net
New email:
PHP Version: OS:

 

 [2003-05-18 04:40 UTC] ngaugler at ngworld dot net
PHP does not protect output_buffers created via configs through the output_buffer, output_handler configurations from individual scripts.  If you configure your php.ini to have output_handler = ob_gzhandler  then run ob_clean() or ob_end_clean() odd results happen and the page does not properly send.  I think PHP should protect buffers created before the script is executed so that the individual may not destroy them.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-18 05:46 UTC] helly@php.net
Try this: 

// delete as much output buffers as possible
while(@ob_end_clean());

 [2003-05-18 06:51 UTC] ngaugler at ngworld dot net
I do not want PHP to delete the buffers.  Let me try and re-explain it.  When I setup the ob_gzhandler, then I run ob_clean or ob_clean_flush PHP will send a partially gzip'ed page to the browser or inconsistant results and the page will not display properly.  What I am suggesting is that if someone sets ob_gzhandler in the PHP.ini, or a situation like this, they cannot clear it out through the script.  It is protected.
 [2003-05-18 07:25 UTC] helly@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

If you want to shoot your self in the knee go ahead.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 23:01:34 2024 UTC