title: shell_exec not working with .sh scripts
body: <p>I have a php file hosted on apache server in Ubuntu. Everything works fine apart from <code>shell_exec('myscript.sh')</code>.</p>
  
  <p>If I execute anything like <code>shell_exec('dir')</code>, <code>shell_exec('ls')</code>, etc., it works fine. But only when I am executing a simple shell script through <code>shell_exec</code>, it doesn't work.</p>
  
  <p>For simplicity I have put just an <code>echo</code> command within shell script. The same script works when I execute through the terminal. Like:</p>
  
  <pre><code># sh myscript.sh // works perfectly fine
  </code></pre>
  
  <p>But not from the PHP, below is my php code</p>
  
  <pre><code>&lt;?php     
  $result = shell_exec('myscript.sh');    
  echo $result;     
  ?&gt;
  </code></pre>
  
  <p>Notes:</p>
  
  <ul>
  <li>Safe mode is off</li>
  <li><code>shell_exec</code> is not there in disable_functions list</li>
  <li>Both php and .sh file are in the same folder</li>
  </ul>
  
  <p>Thanks</p>