PHP命令在shell命令中执行异步php脚本在bitnami LAMP AWS上不起作用

on my local machine I execute the following:

exec('sudo nohup '.PHP_BINDIR.'/php '.ROOT.'/index.php controller=imports action=import id=12 > /dev/null 2>&1 &');

where "ROOT" is a constant with the complete path.

Everything works fine and the script is executed asyncronously with no problems.

When I run the same script on production environment (a bitnami LAMP stack running on AWS) instead: if I run it directly from the terminal it works, when I run it from php it doesn't.

I have nothing in the apache error_log and if I run it with shell_exec the returned value is NULL.

If I try to execute a different script from php (like exec('whoami')) it works, so I don't think is a permissions thing.

I also tried replacing php command with php-cli, nothing changes.

Hope someone can help.

Thanks in advance.