php - Yii shell_exec yiic command run not working -


i trying send large number of email notifications using yiic , run cconsolecommand.

command okay. there no php errors. can't run linux command using shell_exec.

here part of code

if ($post->save()) {    chdir(yii::app()->basepath);   shell_exec('yiic makemasspost ' . $post->id . ' ' . $id . ' > log.txt & echo $!');  } 

there no point in going linux yii run command runs yii application again.

you can try running directly yii

yii::import('application.commands.*'); $command = new mycommand("test", "test"); $command->run(null); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -