I am attempting to call a console command from a controller using the Process component in Symfony2 to have it run in the background, however all it does is hang and end up at a white screen. This is an example of what fails:
$process = new Process('php app/console list');
$process->setWorkingDirectory($this->get('kernel')->getRootDir().'/../');
$process->run();
print $process->getOutput();
I have tried interchanging $process->run() with $process->start() and it still doesn't work.