title: when using shell_exec() function in PHP nothing happens
body: <p>I am trying to execute the following command through PHP using <code>shell_exec()</code> function:</p>
  
  <pre><code>sudo -u USERNAME -pPASSWORD echo "SOME-STRING" &gt; /dev/tcp/127.0.0.1/64444
  </code></pre>
  
  <p>but nothing happens (if I copy/paste it manually to the terminal it works). There is also nothing in the <code>$output</code> of the <code>shell_exec()</code> function.</p>
  
  <p>So with that command I am trying to send a string over TCP through a different user with sudo privileges.</p>
  
  <p>EDIT #1: The full PHP command looks like this:</p>
  
  <pre><code>shell_exec('sudo -u USERNAME -pPASSWORD echo "RLSET|79-192.168.1.33-0-1" &gt; /dev/tcp/127.0.0.1/64444');
  </code></pre>
  
  <p>EDIT #2: I've also checked the <code>phpinfo()</code> function and <code>safe_mode is off</code> also the <code>shell_exec()</code> function is not on the disallowed functions list.</p>
  
  <p>EDIT #4: My PHP PATH variable contains the following locations:</p>
  
  <blockquote>
    <p>/usr/local/bin:/usr/bin:/bin</p>
  </blockquote>
  
  <p>I'm lost here, any and all help would be appreciated.</p>