title: Sox stats and PHP using shell_exec
body: <p>i ran into some problems lately with SoX and PHP. I am a complete beginner in running command-line tools in PHP, so i try to describe the problem as good as i can:</p>
  
  <p>So we have the following situation:</p>
  
  <p>There is a .wav-file in the folder <code>[root]/demo/test.wav</code></p>
  
  <p>My php-file is located is located in <code>[root]/inc/classes.php</code></p>
  
  <p>So the php looks somewhat like this (really a minimal example)</p>
  
  <pre><code>function wav() {
      $output = shell_exec('sox ..\demo\test.wav -n stat');
      var_dump($output);
      echo "&lt;pre&gt;".$output."&lt;/pre&gt;";
  }
  </code></pre>
  
  <p>So if i run the function (and if i take a really huge .wav-file) it seems to "do" something, because the browser takes a long time to run the request.</p>
  
  <p>But everything i receive is "NULL"</p>
  
  <p>If i change the shell_exec-command to <code>shell_exec('sox -help')</code> it works.</p>
  
  <p>So my question is: How come? xD</p>
  
  <p>best regards</p>