1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

(PHP) Instant Browser Output

Discussion in 'Apache' started by T0PS3O, Sep 22, 2005.

  1. #1
    Just swapped servers and noticed something I didn't know was definable.

    On the old one, when I echoed stuff from a long while loop for instance, whatever was being echoed was printed in the browser the moment it was available. Stop for a sec to calculate the next loop's stuff and print right away. Etc. It would slowly fill up the page until the whole script was executed.

    Now on my new server, the exact same script, when I click the 'go' button, doesn't load the next page until it's executed entirely (almost). Only when it's (nearly) done will it load the next page.

    It's sort of annoying because the incremental view was a nice 'progress bar' like feature. It echoes debug stuff amongst others so I'd rather know right away in the first loop when it's broken.

    Judging by this, I assume it's an Apache httpd.conf or php.ini setting. Is that correct and if so, what directive should I be looking for? Any documentation links you can give me to sus this out?

    Thanks.
     
    T0PS3O, Sep 22, 2005 IP
  2. johnt

    johnt Peon

    Messages:
    178
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Sounds like it could be the output_buffering php.ini setting ( maybe ). Have a look at http://www.php.net/manual/en/ref.outcontrol.php.

    If you still have access to your original server, you could try running a diff between the config files from the 2 machines and see if you can spot anything that way.

    John
     
    johnt, Sep 22, 2005 IP
    T0PS3O likes this.
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    You can also disable it with .htaccess
     
    digitalpoint, Sep 22, 2005 IP
  4. ServerUnion

    ServerUnion Peon

    Messages:
    3,611
    Likes Received:
    296
    Best Answers:
    0
    Trophy Points:
    0
    #4
    is there anyway to do this inline. My asp aps I would flush the buffer as page loads. Anyone know the syntax for this in PHP?

    EDIT: in the previous listed link...
     
    ServerUnion, Sep 22, 2005 IP
  5. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Can't compare files since old host was shared/virtual = no access. Though that would be great to do since I'm finding all sorts of little differences like my recent special character mess.

    I'll check out the buffering stuff. Thanks!
     
    T0PS3O, Sep 23, 2005 IP