title: Running PhantomJS from PHP with exec()
body: <p>I've got the following script:</p>
  
  <pre><code>#!/bin/sh
  export DISPLAY=:0
  phantomjs --version
  </code></pre>
  
  <p>It try to run it from the following PHP script:</p>
  
  <pre><code>&lt;?php
  $result = shell_exec('sh test.sh'); 
  echo $result;
  ?&gt;
  </code></pre>
  
  <p>This script return the following error:</p>
  
  <pre><code>[Thu Jun 19 10:31:31 2014] [error] [client] test.sh: line 3: phantomjs: command not found
  </code></pre>
  
  <p>I tried to run <code>phantomjs -v</code> by hand in a console, and it runs fine. I checked the <code>PATH</code>, and phantomjs is correctly defined and found.</p>
  
  <p>The execution environment is a virtual Server with LiveConfig.
  Can someone help me understand what I'm doing wrong ?</p>