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.

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.