w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do I launch a PHP Process in a Screen session that has not been invoked yet?

I think you need to skip -X:

screen -d -m 'php process.php param1 param2'

It's also useful to give the session a name, especially if you're starting several:

screen -d -m -S mysession 'php process.php param1 param2'

-X is for sending commands to screen itself.

See also: this QA here on SO

Additional explanation

The started screen session will only exist as long as your command is running. When php process.php ... exits, screen will also exit.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.