title: php shell_exec can run command but not sh file
body: <p>from PHP I can run commands with shell_exec but can't run bash files</p>
  
  <p>I run this command </p>
  
  <pre><code> sudo ls /var/www/
  </code></pre>
  
  <p>and i get results</p>
  
  <pre><code> /var/www/1.sh 
   /var/www/2.sh 
   /var/www/3.sh
  </code></pre>
  
  <p>but when I run this command nothing happens</p>
  
  <pre><code> $output = shell_exec('sudo sh /var/www/1.sh &gt; /dev/null 2&gt;&amp;1');
   echo "&lt;pre&gt;$output&lt;/pre&gt;";
  </code></pre>
  
  <p>In 1.sh i added this code</p>
  
  <pre><code>   #!/bin/bash
  /usr/bin/echo "test" &gt; TEST1.txt
  </code></pre>
  
  <p>it works when i type in terminal ./1.sh so only from php is not working</p>
  
  <p>Server: centos
  from PHP I think I have root premission to execute commands</p>