I currently use nohup to run a long php script and redirect the live results to a file using this command
nohup php long_file.php >logs 2>&1 &
so i just go and visit logs
file continuously to see the results
Now i want to do the exact same thing using another php file to execute the above command
i tried the above command with php exec
and the redirect output doesn't seem to be working,
I know i can just retrive the output using php and store it using any file write function but the thing is .. the output is too long thats why i keep it running on server's background
a similar question : Shell_exec php with nohup, but it had no answer
any solution ?