I have a PHP script running on the command line on Apache/Windows. It calls exec() to run an external program (dbisql). While it's waiting for the program to finish running, which could be from 1 second to 10 minutes, I am trying to have it output something to indicate that it's still "alive". I know you can do this to have PHP echo text on the same line:
But it seems that while the external program in executing PHP is "frozen" and can't do anything while it waits for the program to finish. Is there some way I can have it echo out something while it waits for the external program to finish?
Thanks!
PHP:
<?php
echo "Starting Iteration" . "\n\r";
for ($i=0;$i<10000;$i++) {
echo "\r" . $i;
}
echo "Ending Iteration" . "\n\r";
?>
But it seems that while the external program in executing PHP is "frozen" and can't do anything while it waits for the program to finish. Is there some way I can have it echo out something while it waits for the external program to finish?
Thanks!