system() mangles the command in php
<p>I'm trying to execute a command through system() in PHP. The command is /usr/bin/unzip, but the function returns with the error code 127. There is nothing else outputted. If I run the very same command directly in a shell it works.</p>

<p>The apache error log says 'sh: /unzip: not found'. I have also tried to put the command into a shell script that is in the same directory as the PHP script and call the shell script through system(). The same happens: if the shell script was called 'doit.sh' the error message in the apache log would be 'sh: /doit.sh: not found'.</p>

<p>exec() has the same behaviour.</p>

<p>The PHP version is 5.2.11-2 with suhosin extensions.</p>

<p>Any ideas what PHP could be doing to my command? </p>
