I'm running a php socket. I run the program through nohup. Run this program properly through root. But my problem is running the program via the exec ()
function in php. When I run the command this way the program runs correctly but the program output is not printed in nohup.out.
my command in ssh:
nohup php my_path/example.php &
#is working
my command in user php:
exec('nohup php my_path/example.php >/dev/null 2>&1 &', $output);
#not update nohup.out
please guide me...