Questions tagged [output-buffering]

Use output-buffering for questions related to the use of one or more buffers in order to optimize performance by batching write operations

References

414 questions
-1
votes
1 answer

Fatal error while using ob_get_clear()

I am getting an error: Fatal error: Call to undefined function ob_get_clear() in C:\wamp\www\project1\linking_files.php on line 5 When i use the $result1 = ob_get_clear(); code to read and store my output in the variable. Can i use anything else…
-1
votes
1 answer

UndefinedMethodException: Attempted to call method "closeOutputBuffers" on class "Symfony\Component\HttpFoundation\Response"

I'm getting the following exception but I don't know where it came from: UndefinedMethodException: Attempted to call method "closeOutputBuffers" on class "Symfony\Component\HttpFoundation\Response" in …
undefined
  • 161
  • 3
  • 16
-1
votes
2 answers

How can I build a string for return from a PHP function in an efficient and maintainable way?

I'm looking into automatically formatting some text over and over again in a project in a way that lends itself towards functions. These functions will stick the text together and format it correctly, including sticking tags around the code,…
Markie
  • 760
  • 17
  • 32
-1
votes
2 answers

output_buffering off at run time in php

'; for( $i = 0 ; $i < 10 ; $i++ ) { echo $i . '
'; flush(); ob_flush(); sleep(1); } echo 'End ...
'; ?> In the code above I am trying to set output_buffering as…
chicharito
  • 1,047
  • 3
  • 12
  • 41
-1
votes
3 answers

Headers already sent?... Where?

Possible Duplicate: Headers already sent by PHP I keep getting this error in my log files: [15-Jan-2013 00:50:04] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/usr/public_html/display.php:1) in…
-2
votes
1 answer

making output buffer work

I have the following crazy snippet as a test ground for ob_start functionality. ob_start(); for ($i = 1; $i <= 100000000; $i++) { echo '
  • ',$i, ' ',date("H:i:s"); ob_flush(); } I wait minutes before I can see something on the…
  • Average Joe
    • 4,521
    • 9
    • 53
    • 81
    -3
    votes
    4 answers

    Redircting to a page in PHP

    I am trying to make a redirect to page based on its referrer. the layout is like
    narayanpatra
    • 5,627
    • 13
    • 51
    • 60
    -4
    votes
    1 answer

    What is the difference between values 1 and 4096 of output_buffering in php.ini

    What does exactly the value of output_buffering ini variable mean in php.ini? On our older server, it was set to 1 output_buffering = 1 With this setting, I could call ob_clean(); and it worked like a charm. However, we moved our system to a new…
    ACs
    • 1,325
    • 2
    • 21
    • 39
    -4
    votes
    1 answer

    Output buffering between methods

    I am trying to get output buffering to persist through initializing a class and outputting the results of that class like shown below class test { function __construct(){ ob_start(); } public function create(){ echo…
    Rujikin
    • 730
    • 2
    • 10
    • 17
    1 2 3
    27
    28