output-buffering Questions

14

Solved

How do I force Python's print function to flush the buffered output to the screen? See also: Disable output buffering if the goal is to change the buffering behaviour generally. This question is a...
Rolph asked 23/10, 2008 at 17:59

7

Solved

What is output buffering and why would you use it in PHP?
Ruralize asked 14/5, 2010 at 5:29

10

Solved

Is ob_start() used for output buffering so that the headers are buffered and not sent to the browser? Am I making sense here? If not then why should we use ob_start()?
Dorelle asked 9/12, 2010 at 18:53

2

I'm testing a suite of REST web services with PHPUnit. We're using output buffering in order to gzip-encode the responses. When I run a test for the service with PHPUnit, I'm getting the error: Ca...
Oops asked 4/1, 2013 at 6:59

4

Solved

Using an R GUI or just R from a command line, this code results in integers being printed 0.2 seconds apart. In contrast when I use R in a jupyter notebook, all of the printing happens only after ...
Epoxy asked 7/6, 2016 at 21:28

4

Solved

I've reinstalled Apache, and switched from PHP 5.3 to 5.6. Everything works, except I get this error, when calling ob_start(): Cannot use output buffering in output buffering display handlers I ...
Disturb asked 26/11, 2015 at 10:22

5

Solved

I'm working with some functions that echo output. But I need their return so I can use them in PHP. This works (seemingly without a hitch) but I wonder, is there a better way? function getEcho(...
Nickerson asked 23/9, 2011 at 14:18

8

I've tried several attempts at getting my flush and ob_flush to work. I've tried setting the ini to allow buffering, I've tried using several different functions I found online for output buffering...
Respect asked 19/12, 2010 at 2:4

8

Solved

I'm trying to use PHPunit to test a class that outputs some custom headers. The problem is that on my machine this: <?php class HeadersTest extends PHPUnit_Framework_TestCase { public funct...
Pneumoencephalogram asked 16/3, 2012 at 22:4

3

My goal is to control buffering of child process when executed with execvp. More precisely, I want to redirect stdout and stderr to the same file descriptor (this is wanted behaviour, I cannot chan...
Vasileior asked 14/4, 2020 at 17:59

1

Solved

The logging handler classes have a flush() method. And looking at the code, logging.FileHandler does not pass a specific buffering mode when calling open(). Therefore when you write to a log file, ...
Sanhedrin asked 10/4, 2019 at 19:9

2

Solved

What's the difference between ob_clean() and ob_flush()? Also what's the difference between ob_end_clean() and ob_end_flush()? I know ob_get_clean() and ob_get_flush() both get the contents and en...
According asked 7/1, 2012 at 15:52

2

Solved

I can't seem to find a good answer on this anywhere. If I am running output buffering, and a die() is fired, does that kick off an ob_end_flush() as well?
Horrocks asked 19/1, 2011 at 15:12

4

Solved

I found this in the Python documentation for File Objects: flush() does not necessarily write the file’s data to disk. Use flush() followed by os.fsync() to ensure this behavior. So my question i...
Tysontyumen asked 19/8, 2011 at 20:32

16

Solved

Is output buffering enabled by default in Python's interpreter for sys.stdout? If the answer is positive, what are all the ways to disable it? Suggestions so far: Use the -u command line switch Wr...
Marrs asked 20/9, 2008 at 9:17

7

Solved

I am new to php and wondering if I can have something like this: <?php ... magicFunctionStart(); ?> <html> <head>...</head> <body>...</body> </html> ...
Defalcate asked 17/10, 2009 at 6:39

7

Solved

I have a ob_start() and a corresponding ob_flush(). I would like to flush a portion of data and continue executing the rest. Using ob_flush() didn't help. Also if possible rest needs to happen with...
Organize asked 14/5, 2012 at 7:28

3

I have some classes I am writing unit tests for which have echoes in them. I want to suppress this output and thought ob_start() and ob_clean() would suffice, but they aren't having an effect. pub...
Rod asked 28/3, 2011 at 15:20

6

Solved

Whats is the best way to obtain the content between two strings e.g. ob_start(); include('externalfile.html'); ## see below $out = ob_get_contents(); ob_end_clean(); preg_match('/{FINDME}(.|\n*)+...
Marciano asked 18/9, 2009 at 16:6

3

Solved

I am having trouble with an update script. It runs for a few hours so I would like it to output live to a text file. I start the document with ob_start(); Then within the while loop (as it iter...
Jinnyjinrikisha asked 22/7, 2010 at 11:2

2

Solved

On node v8.1.4 and v6.11.1 I started out with the following echo server implementation, which I will refer to as pipe.js or pipe. const http = require('http'); const handler = (req, res) => r...
Melantha asked 25/7, 2017 at 13:57

3

Solved

i am confused about the PHP functions ob_flush() and ob_end_flush(). About the function ob_flush the manual says The buffer contents are discarded after ob_flush() is called.This function does no...
Ditto asked 8/9, 2011 at 22:40

12

Hi Please View Below Code : <?php ob_start(); echo "Start ...<br />\n"; for( $i = 0 ; $i < 10 ; $i++ ) { echo "$i<br />\n"; ob_flush(); flush(); sleep(1); } echo "End ...&l...
Hydrolysis asked 24/4, 2011 at 13:59

4

So, I'm looking for something more efficient than this: <?php ob_start(); include 'test.php'; $content = ob_get_contents(); file_put_contents('test.html', $content); echo $content; ?> Th...
Belshazzar asked 6/3, 2009 at 16:49

3

For some reason my XAMPP server is buffering the output of my PHP. I want it to spit it out as it goes. Anyone any ideas which settings I need to change to achieve this?
Wolbrom asked 11/3, 2010 at 14:41

© 2022 - 2024 — McMap. All rights reserved.