php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14226 multiple ob_end_clean() problem
Submitted: 2001-11-26 06:06 UTC Modified: 2002-02-28 21:36 UTC
From: yasuo_ohgaki at yahoo dot com Assigned: yohgaki (profile)
Status: Closed Package: Output Control
PHP Version: 4.1.0/4.2.0 OS: ANY
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: yasuo_ohgaki at yahoo dot com
New email:
PHP Version: OS:

 

 [2001-11-26 06:06 UTC] yasuo_ohgaki at yahoo dot com
4.1.0RC and 4.2.0-dev doesn't output last echo statement. 
Nesting level handling problem?

<?php
ob_start();
echo "AAAAAAAAAAAAAAAAAAAAAAA";

ob_end_clean();
ob_end_clean();
ob_end_clean();
ob_end_clean();
ob_end_clean();
ob_end_clean();
ob_end_clean();
ob_end_clean();
ob_end_clean();

echo "BBBBBBBBBBBBBBBBBBBBBBB";

?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-26 06:16 UTC] yasuo_ohgaki at yahoo dot com
I cannot reproduce segfualt, but it seems PHP may segfault with this. Here is apache error log.

[Mon Nov 26 19:45:19 2001]  Script:  '/home/yohgaki/public_html/bugs/output/bug.php'
---------------------------------------
output.c(245) : Block 0x0818A668 status:
Beginning:      Overrun (magic=0x401D1178, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
[Mon Nov 26 19:45:19 2001]  Script:  '/home/yohgaki/public_html/bugs/output/bug.php'
---------------------------------------
output.c(245) : Block 0x0818A668 status:
Beginning:      Overrun (magic=0x401D1178, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
[Mon Nov 26 19:45:19 2001]  Script:  '/home/yohgaki/public_html/bugs/output/bug.php'
---------------------------------------
output.c(245) : Block 0x0818A668 status:
Beginning:      Overrun (magic=0x401D1178, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
[Mon Nov 26 19:45:19 2001] [notice] child pid 6681 exit signal Segmentation fault (11)

 [2001-12-02 08:20 UTC] yasuo_ohgaki at yahoo dot com
A little update.
ob_end_flush() has problem also.

 [2001-12-02 17:19 UTC] yasuo_ohgaki at yahoo dot com
Ok I think I found what's wrong in PHP.
If zlib.output_compression is enabled and the zlib output compression handler is deleted from php_ob_buffer,  output will not be sent.

I'll leave the real fix for people who knows about zlib output compression and output buffering.

I just need to know nesting level to make my script work as I want. I'll send patch  for the new function later.

 [2001-12-12 04:18 UTC] yohgaki@php.net
Assigned to myself. 
 [2002-02-07 02:41 UTC] yohgaki@php.net
To fix this bug, buffer state managment for each outout buffer is requried.
 - Is started?
 - Is deletable after buffering is started?
for internal buffers. (zlib.compression namely)

I can add new parameter, deletable or not, to ob_start() for user defined handlers also. Anyone need this?
 [2002-02-28 21:36 UTC] yohgaki@php.net
Patch will be commited shortly. 

However, a issue is left. Flush feature need to be reimplemented to work.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 19:01:28 2024 UTC