S
S
SteepNET2021-04-02 17:40:07
PHP
SteepNET, 2021-04-02 17:40:07

shell_exec php not working why?

Good afternoon!
I am trying to convert file in php script like this

$var = shell_exec('/usr/bin/sox sound.wav sound-conv.ogg -G rate 8000');
echo $var;


In the console command
/usr/bin/sox sound.wav sound-conv.ogg -G rate 8000
Works great!

If I do so
$var = shell_exec('dir');
echo $var;


It displays everything, the contents of the directory, which means that shell_exec itself works ..
I missed something somewhere, tell me what?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SteepNET, 2021-04-02
@SteepNET

I figured it out, it was the rights to the directories

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question