In my local machine I am used exec command as below :
if($serverHost == "api.frapi")
{
$phpBianryPath='/Applications/MAMP/bin/php/php5.4.10/bin/php';
}
else
{
$phpBianryPath='/usr/bin/php';
}
$logDir= dirname(__FILE__). '/BackgroundTask';
exec("$phpBianryPath $logDir/notificationCall.php $token >> $logDir/log_file.log 2>&1 &");
It works perfect in my local machine.But when I upload it on production server and then try to use it then it gives error as below:
sh: /var/www/html/example/src/frapi/custom/Action/BackgroundTask/log_file.log:
Permission denied
Please Guide me on this.I don't understand why it is not working in production?