Re: asynchronous launch of a script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 28, 2011 at 1:02 PM, Stuart Dallas <stuart@xxxxxxxx> wrote:

> While this will work, I would caution against doing this, especially when
> using Apache as the web server. . . .
>
> Forking an HTTP request handler can lead to some very unwelcome
> side-effects. I'd urge you not to do this. It may appear to work for a
> while, but I guarantee you'll live to regret it.


Thank you, Negative Nancy. :) Those are excellent points, and luckily we're
doing this for an infrequently run internal report that runs on a machine
that doesn't do much else.

Alternatively, you can use & in bash or some other shell to spawn a
background job, and I suppose you could create a wrapper shell script that
does that calls php in the background. But there must be a direct way using
an alternate to exec().

David

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux