|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35156 Calling ob_flush after creating an ob callback causes "Segmentation fault"
Submitted: 2005-11-08 16:35 UTC Modified: 2005-11-08 17:21 UTC
From: php at kloopy dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 4.4.1 OS: Win32 and Linux
Private report: No CVE-ID:
 [2005-11-08 16:35 UTC] php at kloopy dot com
When setting an output buffer that returns an empty string (I do have a good reason for doing this), later calls to ob_flush() cause PHP to seg fault. 

Tested on PHP-4.1.1 on linux (CLI and Apache2 module) with same error on both.

Also tested on PHP-5.0.5 on Win32 (CLI and Apache2 module) with same error on both.

Reproduce code:
function nooutput($text) { return ""; } 
print "Before\n"; 
print "Middle\n"; 
print "After\n"; 

Expected result:

Actual result:
Segmentation fault


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-08 16:50 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-11-08 17:13 UTC] php at kloopy dot com
Fixed in latest PHP5 Win32 snapshop.
Also fixed in latest PHP4.4.2 Win32 snapshot.

 [2005-11-08 17:21 UTC]
Marking as closed then.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 00:01:40 2015 UTC