title: Executing shell script outside of webroot from php
body: <p>I have a shell script in the following dir which is outside of the webroot :</p>
  
  <pre><code> /usr/share/myshellscript.sh
  </code></pre>
  
  <p>And I want to be able to run it when called from a php file located at :</p>
  
  <pre><code> /var/www/html/myphpscript.php
  </code></pre>
  
  <p>How do I navigate the php script to the correct directory where it can run the shell script?</p>
  
  <p>I've tried :</p>
  
  <pre><code> exec('/usr/share/myshellscript.sh');
  </code></pre>
  
  <p>But nothing is happening?</p>
  
  <p>I've tested the .sh script on the server itself and it's working fine, just can't get php to execute it.</p>
  
  <p>System : Ubunutu 14.04 webserver / php 5.5.9-1</p>