title: How do I redirect the STDOUT for a PHP process that is invoked via screen -d -m?
body: <p>I'm invoking a PHP process using <code>screen -d -m</code> so that it launches the process in a new <code>screen</code> session.  I'd like to store the STDOUT of that PHP process in a log file.  Normally, I can simply add <code>&gt; output.log</code> and that log file will be created and populated with the STDOUT of the PHP process.  This does not work when the PHP process is launched within a new screen session.  The log file is created but it is never written to.</p>
  
  <p><strong>How do I record the STDOUT of this PHP process?</strong></p>
  
  <pre><code>screen -d -m php process.php user_input_1 user_input_1 &gt; output.log
  </code></pre>
  
  <p>I believe this command is redirecting the STDOUT of the <code>screen</code> command to <code>output.log</code> and not the STDOUT of the <code>process.php</code>.</p>