RE: No ouput until program end, why?
| From: | Tim Ward | Date: | Fri, 04 Oct 2002 08:25:46 +0000 |
| Subject: | RE: No ouput until program end, why? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-118826@lists.php.net to get a copy of this message | ||
does output buffering not work with command line PHP?
http://www.php.net/manual/en/ref.outcontrol.php
Tim Ward
www.chessish.com
> -----Original Message-----
> From: Jean-Christian Imbeault [mailto:jean_christian@myrealbox.com]
> Sent: 04 October 2002 05:59
> To: php-general@lists.php.net
> Subject: No ouput until program end, why?
>
>
> I am running a PHP program under Linux on the command line.
> The problem
> I have is that I get no output to the screen until the
> program finishes.
>
> I have lots of echo statements throughout the program to help
> me debug
> but none of them are printed until the program finishes,
> which is really
> a pain since the prog takes 30 minutes to run ...
>
> The main() looks something like this. Can someone help me
> figure out why
> it is not printing anything until the program exists?
>
> pg_exec($CONN, "BEGIN");
> for ($i = 0; $i < 6001; $i++) {
> $retval = process($aFields);
> if ( ($i % 100) == 0 ) echo "$i\n";
> if ($retval == 1) echo "error on line $i \n";
> }
>
> echo "COMMIT \n";
> pg_exec($CONN, "COMMIT");
>
> Thanks,
>
> Jc
>
>