Re: Capturing shell command output.
| From: | Richard Lynch | Date: | Tue, 28 Aug 2007 01:26:55 +0000 |
| Subject: | Re: Capturing shell command output. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-261394@lists.php.net to get a copy of this message | ||
On Mon, August 27, 2007 2:43 am, shiplu wrote:
> I have tried same file as cli and as webpage. I don't know why only
> cli version works nicely. There may be some issue. But my technique
> has some advantages. It can run command asynchronously. Thats what i
> need for my application. I can create command queue. I and I can get
> the completion percentage from there.
> Whatever, I wish I could know those issues.
> Rather it could happen that, php-apache framework is doing something
> that I am unaware of.
You can sometimes tack " &" onto the end of an exec() argument and get
an asynchronous result.
But then you won't get the results of the command no way nohow.
I generally have found that if I really need async operations, it's
better to just write a script that does a few operations at a time,
and then call it repeatedly in cron.
Any sort of web-interface merely accepts input for a queue of things
"to do" by the cron job, and then provides a status board page and/or
automated email upon completion of whatever the user is waiting for.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?