Re: status note for scripts that run a long time

From: Guillaume Brocker (guillaume.brocker_at_ircad.u-strasbg.fr)
Date: 03/25/04


Date: Thu, 25 Mar 2004 12:37:00 +0100

Kevin Thorpe wrote:
> Alvaro G Vicario wrote:
>
>> *** lars knut wrote/escribió (25 Mar 2004 02:17:35 -0800):
>>
>>> So I wonder if there's a way to tell the user, that the script is still
>>> running and he's got to wait.
>>
>>
>>
>> In this situation, I normally use "echo"'s:
>>
>> echo "Processing row #" . $row_nr;
>
>
> I've tried that but Apache caches the php output and it all appears
> together at the end. Is there any way to force buffering off?

Well, apache is doing some caching, but PHP too. To send the output
buffer of PHP, use *flush*. I'm using this in some of my scripts to send
to the browser the output produced by shell scripts while they are
running and it works fine.

-- 
Guillaume Brocker


Relevant Pages

  • Re: what does the error " bad interpreter" mean?
    ... machine (though I've written dozens of PHP cron jobs for my web ... In a terminal window, I try to execute this, and I get a "bad ... The php5 interpreter in /usr/share/ has permissions set to 755. ... No. Shell scripts are not PHP, and do not use the PHP interpreter. ...
    (comp.lang.php)
  • Re: php-cli for system admin?
    ... that PHP actually is not only web-based and cli based... ... but GTK2 based;) so not only yopu can use shell scripts to admin the ... setups for Webapps that i've made.... ... and the client doesnt needs big ...
    (comp.lang.php)
  • Re: [PHP] php via cmdline including unwanted headers
    ... this problem started when i switched to php cgi. ... While php-cli is an improvement over php-cgi for shell scripts it is not ... They've worked all the way from php 4.1.0 all the way through 5.2.0 (I ... scalable system for accessing system services | ...
    (php.general)
  • Re: what does the error " bad interpreter" mean?
    ... machine (though I've written dozens of PHP cron jobs for my web ... server), so I thought I'd start off with a very simple test: ... interpreter as what runs through an Apace server? ... No. Shell scripts are not PHP, and do not use the PHP interpreter. ...
    (comp.lang.php)
  • Re: Why are comments preceeded by // not ignored?
    ... as with all shell scripts, you need to tell the system what to interpret ... I checked the location of php: ... char 3: ...
    (comp.lang.php)