Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7667029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:59:31+00:00 2026-05-31T14:59:31+00:00

I have an object for tasks and on __deconstruct(), it’s meant to run some

  • 0

I have an object for tasks and on __deconstruct(), it’s meant to run some of the lengthier cleanup tasks after the rest of the page has already loaded. Unfortunately, it buffers the output and won’t send it until after the tasks are finished (nothing is printed in the tasks).

I’ve read through http://www.php.net/flush and tried all the suggestions there. Obviously I’ve tried disabling output_buffering in php.ini. I’ve disabled deflate_module, zlib compression is off, don’t have mod_gzip. Calling flush() or ob_flush() has no effect, nor does enabling implicit_flush.

I’m just running XAMPP (currently apache 2.2.17, php 5.3.4) under Windows Server 2008 R2. PHP is being run as a module.

And yes, I could set up some little AJAX hack to run the task manager or even set up a scheduled task to run this specific task, but output buffering has been an issue elsewhere, too. Would just like it to be gone sometimes.

From a similar thread, someone suggested seeing what the following would do:

<?php
while (TRUE)
{
    echo 'x';
    flush();
    sleep(1);
}
?>

As expected, the page displays nothing until the maximum execution time is reached, at which point it flushes the buffer.

This has become extremely frustrating. Anyone have any ideas what could still be causing it to buffer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:59:32+00:00Added an answer on May 31, 2026 at 2:59 pm

    You’re only sending a small amount of data. Browsers have their own buffer, which can be based on a number of bytes, by which elements have been received, or by something else.

    In short, there is nothing you can do about this. The buffering is happening client-side, not server-side. You could try sending more data before your xs.

    You can prove this by packet sniffing the connection between the server and the browser, with Wireshark or similar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app which has tasks that run on regular intervals. Instead of
I have some code where the timer EventHandler has this void timer_Tick(object sender, EventArgs
I have a List object, with nested Tasks. I have created a page that
I have a Task object that has a collection of Label objects ... in
I have object A which in turn has a property of type Object B
I have two tables: object that has object_id column and avalues that have object_id
I think I read somewhere that some modules only have object oriented interfaces (
I have an object Tasks with a model like this has_many :notes, :validate =>
I am writing some test code on Cocoa. Have put the AppController object in
I have a model relationship where today has many tasks I'm trying to retrieve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.