Re: timeouts and set_time_limit
| From: | Gabor Hojtsy | Date: | Sat, 30 Aug 2003 09:00:44 +0000 |
| Subject: | Re: timeouts and set_time_limit | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-20679@lists.php.net to get a copy of this message | ||
Please ask support questions at php-general@lists.php.net
Goba
Thomas L. Packer at home wrote:
Hello php peopleI'm having trouble getting my php script's output to reach the web browser no matter what I try, no matter if I use IE or Mozilla. I'm using php version 4.2.2. I've tried using:echo str_pad( " ", 256 ); ob_end_flush(); ob_flush(); flush(); And everything else I can find that might possibly work.Nothing will force any output of my php PRINT statements until the whole script has ended executing. Is this a bug in PHP? I even downloaded some code from your php web site posted by a php user who made his own progress bar for web pages using php and javascript. I'm assuming this code works for him, otherwise he would not have posted it. But when I run it, I get the same problem: the progress bar will not be updated until the php script has completed.The reason I want to force output during execution of my script is because I am calling a long process using popen() (and collecting its output line by line) and I often get Gateway Time-Out errors. I want something to be written to the browser so it won't time out.Another solution to the problem could be a function like set_time_limit( ). Is there such a function that can extend the time before the server times out, a function that actually takes into account the long process I am calling from php?Or, is there a header( ) parameter I could use to do this, i.e. to extend the time before a 504 gateway timeout occurs using HTTP headers?Please help.Thanks,tomp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Víðar sum quem nihil obstat. Omnia apud me Mathesis fiunt. www.Ontolog.Com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~