I am trying to start a nodejs server inside a tmux session using PHP with this code:
print_r(shell_exec("tmux send -t session1.0 ./start.sh ENTER 2>&1"));
This code returns: no server running on /tmp/tmux-33/default. I have created this session (session1) using tmux new -s session1 with root account. When I try to start the session using php (print_r(shell_exec("tmux new -s worker1 2>&1"));), this returns open terminal failed: not a terminal
How do I start a nodejs server using PHP?