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
Post a Comment