I think there are many similar posts, but I have not found a solution after the search.
Basically, I am trying to run two scripts in the background. When I run them on the command line, I see after calling my first script:
/usr/bin/nohup PHP .php > nohupoutput.log & echo $!
I tried ...script.php > /dev/null & with the same result. I get:
/usr/bin/nohup: ignoring input and redirecting stderr to stdout
which I ignore and run the second. I noticed that it was hanging there, and pressing Enter returned me to machine:~folder>
/usr/bin/nohup PHP 2.php > nohupoutput.log & echo $!
Both scripts work. I tried then converting this to a shell_exec command and nothing works. I suspect that the ignoring input bit is causing difficulties, but I'm not sure. Despite this, the following does not work. It just freezes in the browser:
$output = shell_exec('/usr/bin/nohup PHP .php > /dev/null &'); $output = shell_exec('/usr/bin/nohup PHP 2.php > /dev/null &');
php shell-exec shellexecute exec nohup
Rio
source share