Server

PHP: How to run / execute a script in the background forever through SSH ?

You can execute a php script in the background forever by using SSH through PHP but for that you have to make sure first that SSH2 extension is available.

PHP DOCS: http://www.php.net/manual/en/function.ssh2-exec.php

If you want to do same thing through SSH Terminal (PuTTY) then follow this tutorial:
SSH: how to run a PHP script in background forever in Linux (CentOS) ? […]

SSH: how to run a PHP script in background forever in Linux (CentOS) ?

If you want to run a PHP script in the background forever through SSH then follow these steps:

If you are using a SSH terminal (PuTTY) then directly run following command:

Now your script is running in background and will keep running indefinitely even after closing terminal.

To check if your script is running or not You can run following command:

If you want to […]