flush() problems with IE5

From: Date: Tue, 22 Aug 2000 10:33:04 +0000
Subject: flush() problems with IE5
Groups: php.general 
Request: Send a blank email to php-general+get-12914@lists.php.net to get a copy of this message
Hi, I know this topic has been brought up before, but a search at the archives didn't produce a working solution for me. The problem is one of my biggest scripts which makes thumbnails of images at the server, and I'd like to display a "Please wait - don't hit reload or close browser" -window while the work is in progress. Everything works beautifully in NN4.7 - the browser outputs the first paragraph of text nicely and starts work, and when the script has finished it's work it displays a "All done - You can continue" -link. My HTML is valid, and I have included the text inside <P> - </P> -pair and tried to add <BR> - \n and newlinews in the code - still IE5sp1 waits for the script to finish before outputting anything. There's no difference if I use "print", "echo" or just plain HTML before the first <?php -tag. I have also tried to output plain text using header("Content-Type: text/plain"); before the output, NN4.7 honours this well but again IE5 displays the output as parsed HTML. The strangest thing is that if I run the this exact same code by typing the URL in question to the location-bar it works beautifully! (The actual script needs some GET-variables to work) But when used inside my application as a <A HREF> -link the flushing doesn't work. This is driving me nuts... My exact version of IE is 5.00.2919.6307, PHP is 4.0.1pl2 compiled as Apache module running on RH Linux 6.2. The snippet in question is something like this: print " <HTML> <HEAD> <TITLE> Title </TITLE> </HEAD> <BODY> <P> <CENTER><H3>Please wait while updating the database...</H3></CENTER></P><BR> "; flush(); chdir("/some/where"); exec("/something.sh"); echo "<CENTER>All done!</CENTER></BODY></HTML>"; -- Kari Asikainen Ilamark Oy tel: +358 14 716155 mobile: +358 40 525 9842

« previous php.general (#12914) next »