I need to start php from cli and redirect stdout to /dev/null, but I'm using args and redirect don't work.
php status.php Arg1 Arg2 > /dev/null 2>&1
How to fix that?
I need to start php from cli and redirect stdout to /dev/null, but I'm using args and redirect don't work.
php status.php Arg1 Arg2 > /dev/null 2>&1
How to fix that?
Well the redirect works, there is nothing unique about calling php vs any other application. Sometimes you have to play around with different kinds of pipe to null options before you get the right one to work. Note you can include || true as well >/dev/null 2>&1 || true.
$php ssh2_connect.php
PHP Warning: ssh2_connect(): Unable to connect on line 12
$
$ php ssh2_connect.php > /dev/null 2>&1
$