On Tue, Jun 28, 2011 at 1:02 PM, Stuart Dallas <stu...@3ft9.com> 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().


Reply via email to