0

I start my websocket script like so:

nohup php server.php &

and I close the ssh client and it seems to be working fine for a while, but after say half an hour or so it stops working, any idea why and how to make it permanent?

1 Answers1

-3

Try to use Tmux (or screen):

apt-get install tmux

after:

 tmux attach; tmux new

and finally:

php server.php

Docs https://wiki.archlinux.org/index.php/Tmux

Jstars
  • 11
  • 3
  • Sorry but I am not very knowledgeable about server administration, am I supposed to have the `apt-get` command as is in my ssh, because I don't? – user6562256 Jul 16 '16 at 09:33
  • @user6562256 `apt-get` is used on Debian and derivatives. Which OS are you running? Additionally, it requires privileges, so become `root` or use `sudo`. – gxx Jul 16 '16 at 09:54
  • 1
    `tmux` / `screen` are **not** a replacement for proper integration into an init system. – Sven Jul 16 '16 at 09:56