Professional Web Applications Themes

[PHP] PHP output|Buffer, PLEASE ADVISE - PHP Development

On Sun, 21 Sep 2003, nabil wrote: > In general , when you open an html file , the browser start to display and > draw the tables, then start to display the pictures (on slow internet > connection).. but when you make your html code inside an php the output will > be different, it will buffer everything then it will pop the whole page. > > I have a question.. how can I make php output and display my website as > stream html.. > > because I have a postnuke website and it take ages for popping ...

  1. #1

    Default Re: [PHP] PHP output|Buffer, PLEASE ADVISE

    On Sun, 21 Sep 2003, nabil wrote:
    > In general , when you open an html file , the browser start to display and
    > draw the tables, then start to display the pictures (on slow internet
    > connection).. but when you make your html code inside an php the output will
    > be different, it will buffer everything then it will pop the whole page.
    >
    > I have a question.. how can I make php output and display my website as
    > stream html..
    >
    > because I have a postnuke website and it take ages for popping all contents
    > , but when I saved it as html and I upload it on the same apache server ,
    > the home page start to be displayed picture after picture and so on ...
    >
    > Please any advise ??
    The output won't actually be different unless you have turned on
    zlib.output_compression or output_buffering in your php.ini file. Both of
    these are off by default. Without these PHP will not do any buffering.
    The only buffering you see is done by Apache and this buffering happens in
    your static file case as well. It is natural that a static file version
    of a big complex page will render faster than the PHP-generated one.

    You can ask Apache to flush its internal buffer by using the flush() call
    from PHP, but it really isn't advised to do that too often. Apache is
    buffering in order to spew out full TCP packets for maximum efficiency.
    Using flush() defeats that and your application end-to-end page delivery
    time will increase.

    -Rasmus
    Rasmus Lerdorf Guest

  2. #2

    Default Re: [PHP] PHP output|Buffer, PLEASE ADVISE

    Check "Activate compression" setting in postnuke admin. You want it to
    be "No". If this setting is activated, ob_start("ob_gzhandler"); is
    called in pnInit()

    nabil wrote:
    > Hi all;
    >
    > In general , when you open an html file , the browser start to display and
    > draw the tables, then start to display the pictures (on slow internet
    > connection).. but when you make your html code inside an php the output will
    > be different, it will buffer everything then it will pop the whole page.
    >
    > I have a question.. how can I make php output and display my website as
    > stream html..
    >
    > because I have a postnuke website and it take ages for popping all contents
    > , but when I saved it as html and I upload it on the same apache server ,
    > the home page start to be displayed picture after picture and so on ...
    >
    >
    > Please any advise ??
    >
    > Nabil
    >
    Marek Kilimajer Guest

Similar Threads

  1. Replies: 0
    Last Post: October 2nd, 03:24 AM
  2. Replies: 0
    Last Post: October 2nd, 03:19 AM
  3. #25701 [Bgs->Opn]: Calling flush from within an output buffer prevents headers from being sent
    By scottmacvicar at ntlworld dot com in forum PHP Development
    Replies: 0
    Last Post: October 1st, 02:33 PM
  4. #25701 [Bgs]: Calling flush from within an output buffer prevents headers from being sent
    By scottmacvicar at ntlworld dot com in forum PHP Development
    Replies: 0
    Last Post: September 30th, 11:24 PM
  5. Replies: 0
    Last Post: September 30th, 06:40 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139