title: Running Linux Command from PHP
body: <p>I have a bit of a unique situation. I'm trying to run a video encoding program from a PHP script called Diascope, which relies on the 'convert' command provided by ImageMagick. I have a bash script that executes a really simple conversion and then it runs the application called Diascope. This is the conversion code, and the following does work, it creates the new file</p>
  
  <pre><code>convert image.jpg image.png
  </code></pre>
  
  <p>Shows no errors, but then I run Diascope like this </p>
  
  <pre><code>diascope -clean audio.txt
  </code></pre>
  
  <p>And I can see that Diascope loads property because it prints "Diascope 0.2.1": </p>
  
  <blockquote>
    <p>diascope 0.2.1 (ms 2006-2010) slideshow generator See
    <a href="http://diascope.sf.net" rel="nofollow">http://diascope.sf.net</a> for documentation and updates.</p>
    
    <p>Error: executable program not found: convert Please see the
    requirements for diascope in the release notes.</p>
  </blockquote>
  
  <p>When I run <code>shell_exec("whoami");</code> it prints "nobody"</p>
  
  <p>So why can I run convert by itself, but the "diascope" process can't seem to utilize it? I have tried going into <code>/usr/local/bin/convert</code> and chmoding it to 777, but it didn't seem to have any effect, what else could I try here?</p>
  
  <p>UPDATE: I should probably add that when I try to run <code>diascope -clean audio.txt</code> as root on the terminal, it creates the audio.flv file like it should, also I can't seem to <code>sudo su nobody</code> it returns <code>This account is currently not available.</code></p>