Posted by Rich on 02/13/06 20:20
In article <45bp05F5vmmjU1@individual.net>, J.O. Aho says...
>
>MS wrote:
>
>> Am I looking at the correct command? or is there a better one?
>>
>> and what would be the correct format for this function?
>>
>> exec(thumb.php);
>
>exec('php /path/to/thumb.php');
>
>This won't run the process in background, but php will wait for the result.
>
>You could try with
>
>shell_exec('php /path/to/thumb.php &');
>
>but not sure it will detach the the process from the php thread.
>
>
>> how do I force returned data to a file? as per note on php.net
>
>I would suggest you let the thumb.php handle the output to the file itself,
>for files, take a look at http://www.php.net/manual/en/function.file.php
>
>
>
> //Aho
When checking the php.net site there were a few examples of background processes
using exec() that may work out okay. I think some of these writing all output to
/dev/null and setting it as a background process with "&".
exec('php /path/to/thumb.php > /dev/null 2>&1 &');
Similar to your suggestion, but it looked like shell_exec may be expecting
results to store in a variable.
Rich
--
Newsguy Bandwidth Blowout Feb-21-2006
http://newsguy.com/nolimits.htm
[Back to original message]
|