I am trying to send large number of email notifications using Yiic
and run CConsoleCommand
.
Command is okay. There are no PHP errors. I can't run linux
command using shell_exec
.
Here is part of code
if ($post->save()) {
chdir(Yii::app()->basePath);
shell_exec('yiic makemasspost ' . $post->id . ' ' . $id . ' > log.txt & echo $!');
}
There is no point in going to linux from yii to run a command that actually runs an yii application again.
You can try running it directly from Yii