title: Can't run shell script from php web script
body: <p>I am trying to run a shell script from a php script.</p>
  
  <p>I have complete control of the environment (unix on mac), I should have all the permissions, etc. set correctly.</p>
  
  <p>The web script is in <code>/htdocs/</code></p>
  
  <p>The shell script can be executed from anywhere so when I go to /htdocs/ in the shell, I can easily run it like this:
  $ my_shellscript</p>
  
  <p>.. but when my php script (which is located in htdocs) tries to call it: </p>
  
  <pre><code>shell_exec('my_shellscript');
  </code></pre>
  
  <p>I get nothing.</p>
  
  <p>I have proven the script can be called from that location and I have temporarily granted full access to try to get it working somehow. I am going crazy, please help. </p>
  
  <p>If you know of some other way of triggering a shell script via the web that would be fine.</p>
  
  <p>Thanks in advance.</p>