Hi all,
First of all thank you for this forum. It’s very usefull!
I had to execute a shell php (like as $>php ./test.php) and I find the RunActions extention, but I don’t understand how to use it.
In my controller, I create a new method and put in this code
public function actionTest()
{
Yii::import('ext.runactions.components.ERunActions');
if (ERunActions::runBackground())
{
Yii::log('Starting background task...');
ERunActions::touchUrlExt("/home/public_html/proyect/testaction.php",$postData=null,$contentType=null,$httpClientConfig=array());
//Inform the user if 'hasFlash' is implemented in all views
Yii::app()->user->setFlash('runbackground','Process finished');
Yii::log('Background task executed');
Yii::app()->end();
}else{
echo "Finish!!!";
}
}
To test it, the code testaction.php, open and write into a log file.
I checked on application.log, but I didn’t find any errors, so I don’t understand where is the problem.
have any suggestion to solve it?
Thank you!