php - Symfony2 Process::start() fails when running in production environment -


i using symfony2 process component fire off cli script generates rather large report. @ point using ajax monitor it's progress , show progress bar fill on front end. when executing following code in app_dev.php runs , there no issues. however, when run in production fails start process().

here code:

public function generateaction($reportslug)     {         $this->wrangler->addmoodleglobal('cfg');         $time = time();          $commandslug = "report:{$reportslug}";         $console = $this->container->get('kernel')->getrootdir() ."/console";          $process = new process("exec php {$console} {$commandslug} {$time} > /dev/null 2>/dev/null &");          $process->start();          return $this->renderjson(json_encode(array(             'success' => true,             'message' => "php {$console} {$commandslug}",             'time' => $time         )));     } 

i have run php app/console cache:clear --env="prod"

as php app/console cache:warmup --env="prod"

bot no avail.

thanks.

not sure real issue when changed line

$process = new process("exec php {$console} {$commandslug} {$time} > /dev/null 2>/dev/null &"); 

to use temp output file:

$process = new process("exec php {$console} {$commandslug} {$time} > /tmp/output.log 2>/tmp/output.log &"); 

everything started work properly. can shed light on this?


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -