php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43014 ob_start() crashes after login
Submitted: 2007-10-18 05:52 UTC Modified: 2007-11-20 01:00 UTC
From: laurentschoenaers at gmail dot com Assigned:
Status: No Feedback Package: Output Control
PHP Version: 4.4.7 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-10-18 05:52 UTC] laurentschoenaers at gmail dot com
Description:
------------
Hey guys,

I'm running a website, and since yesterday at midnight some part of my script stopped to run. Nothing has been changed in the scripts and my host even re?nstalled to whole server for me to make sure the problem isn't server-related. But still the problem is still here.

If I comment my ob_start() function, the sites starts good, but only parts are shown and full of header error. Ok no problem, but I want the ob_start() to be there, but then the site doesn't load, the browser gives a "page not found error'.

Here's the situation:
I use the ob_start() script on all my pages (homepage, usersection and adminpanel). Only in the usersection it suddenly stopped to work properly. After several mails with my host they say there is an "exit signal segmental fault" or something. How can I resolve this? And how come that suddenly it stopped to work while nothing was changed to the server nor to the scripts?

Reproduce code:
---------------
in the top file:

<?php

function callback($buffer)
{
	return (ereg_replace("nothing", "nothing", $buffer));
}

ob_start("callback");

?>

In the bottom file:
<?
mysql_close();
ob_end_flush();
?>

Expected result:
----------------
After a login the usersection should be loaded. Which worked fine till yesterday at midnight.

Actual result:
--------------
The browsers gives a blank page with "page not found" error.

With the ob_start() commented, it only shows parts of the code, with suddenly some uncompiled html tages in my page. But mostly only 75% of the html-code gets through, and the other 25% gets ignored.

I use in my files:

<?
include("include/ig_top.php");

...

include("include/ig_bottom.php");
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-18 13:31 UTC] johannes@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.
 [2007-10-18 15:17 UTC] laurentschoenaers at gmail dot com
Well the problem is that on my homepage and my admin panel it still works fine. And the script has been running fine for around 4 years, and it suddenly stopped working.

----------

<?php

function callback($buffer)
{
	return (ereg_replace("nothing", "nothing", $buffer));
}

ob_start("callback");

//code goes here...

ob_end_flush();
?>

--------

On my local server it still works fine as well.. Is there any reason why ob_start() could sunndely stop working? Maybe clearing the cache or something?

Sincerly,
Laurent Schoenaers
 [2007-11-12 10:22 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2007-11-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC