0

I am running forever scripts, I want control them via a website.

if ($_GET['list']) {
    $list = shell_exec("forever list");
    echo ($list);
}

but the output is:

'No forever processes running'.

When I execute forever list on PuTTY it's working. Su root didn't help.

Michael
  • 3,093
  • 7
  • 39
  • 83
Damian
  • 1

1 Answers1

0

You should execute your PHP script as the same user that started the processes via forever, otherwise you will get this message saying that no processes are running.

This other question will get you in the right direction; Running command-line application from PHP as specific user

Renato Gama
  • 16,431
  • 12
  • 58
  • 92