 <p>The PHP script probably doesn't know where to find these things you're referring to in the <code>exec</code> command. When you run this from the command line, the shell will look for them in the directory you are in at that point in time; but when you run it from PHP, it probably defaults to the PHP dir and not the specific dir in which your files are. So write out the full path. </p>