Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2006
    Posts
    10

    Thumbs up Unanswered: How to to check a php server support for flush?

    Hi there,

    I am working now to get flush working on my page,
    I took this script for example:

    [code:1]<pre>
    <?php

    ob_end_flush();

    echo "Test1\n";
    flush();
    sleep(3);

    echo "Test2\n";

    ?>
    </pre>[/code:1]


    It works on my own server but not in a web hosting.

    I have put in .htaccess
    [code:1]<IfModule mod_gzip.c>
    mod_gzip_on no
    </IfModule>[/code:1]

    I put flush all HTML up to and including the <body> tag (<head>, <meta>, etc.), the browser won't respond.

    Is there stil something I've missed?
    What is the easiest way to check a php server support for flush?[/code]
    Monty Auto

    Fast.ProBuilderPLUS.com
    One of The Fastest Growing Online Business Available Today.

  2. #2
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Does it fail in all browsers?
    What are you trying to do that utilises ob_end_flush();
    Why are you using flush() ?
    What error are you getting? What versions of PHP are you utilising?

    mod_gzip_on no
    shouldn't make a difference to your ob_end_flush, it is only related to compression of http network transfer and relies on the client being able to decode the compression (which some browsers don't support).

  3. #3
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    See http://uk3.php.net/flush for notes on the flush() function.
    In particular see the section starting
    Server modules for Apache like mod_gzip may do buffering of their own that will cause flush() to not result in data being sent immediately to the client.
    Taking a guess I would say you're developing on Windows and publishing to Linux?

  4. #4
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    flush
    ob_start
    ob_end_clean
    ob_end_flush
    ob_flush

    all exist in versions 4->5

    Use phpinfo() to determine is any of the functions have been disabled in Apache.

  5. #5
    Join Date
    Oct 2006
    Posts
    10
    Quote Originally Posted by aschk
    flush
    ob_start
    ob_end_clean
    ob_end_flush
    ob_flush

    all exist in versions 4->5

    Use phpinfo() to determine is any of the functions have been disabled in Apache.
    I found no none of function disabled in phpinfo.
    I have tried it in some servers,
    It quite funny some server it works but others no.
    Monty Auto

    Fast.ProBuilderPLUS.com
    One of The Fastest Growing Online Business Available Today.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •