I'm trying to call a PHP page to run when called from another page. To do this it seems i have to use the exec() function. The code would go something like
// set pathing
$file = 'TEXT_small.m4v';
$localfile = '/user/dac420/incoming/'.$file;
$remotefolder = '/user/dac420/outgoing/';
// exec the file and pass vars. transfer.php for this example just echo's Hi to the motherboard.
exec('php transfer.php '.$localfile.' '.$remotefolder.' > '.$file.' &', $output, $result);
Running this code and few variations of it give me either empty $result and $output vars or this
Include/Require will not work. I should have explained better. The page im calling via exec() is transferring 1G file between two servers. If this file is include()'d, the page will hang white until the transfer is complete. Therefor i need to create a separate php process to run in the background. This way once the transfer is started, the user can continue with their browsing without waiting.
The way to do this is with exec(). I just need to know how i went wrong. I think its pathing. Fu*^ing pathing every time! But maybe someone can help. Thanks.
Bit of a guess but could you just kick off a Unix process in the background to do whatever it is you're doing? I'm unsure whether you'd need the "nohup" command on the front. You'll want some method of seeing if the job ran fine as well.