I know that this is quite an old question, but I had the same problem, and that was the only working solution after the failure of the attempt and exec, shell_exec, process_open:
$process = popen("nohup $D_command > /dev/null 2> /dev/null & echo $!", 'r');
$pid = fread($process, 32);
source
share