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:
So we have the following situation:
There is a .wav-file in the folder [root]/demo/test.wav
My php-file is located is located in [root]/inc/classes.php
So the php looks somewhat like this (really a minimal example)
function wav() {
$output = shell_exec('sox ..\demo\test.wav -n stat');
var_dump($output);
echo "<pre>".$output."</pre>";
}
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.
But everything i receive is "NULL"
If i change the shell_exec-command to shell_exec('sox -help')
it works.
So my question is: How come? xD
best regards