AFICT, the standard Unix Apache configuration causes an rare problem when running a job in the background. The MaxRequestsPerChild directive causes the child to terminate after 1000 requests, any background processes associated with the child will die with the child unless they are started with the "nohup" command. Thus, the proper way to start a job in the background is to use:
exec('nohup my-command > /dev/null 2>&1 &')