title: Php - System function - /usr/bin/echo Hello : No such file or directory
body: <p>I'm a newbie to PhP.<br>
  When I run a linux terminal command using <code>System</code> function in php, I'm getting errors in <code>error_log</code>.<br>
  Here is my code:  </p>
  
  <pre><code>if(isset($_POST['submit_button']))
  {
      $name=$_POST['User_name']; // here $name contains 'John'
      echo '&lt;pre&gt;';
  
      $command="/usr/bin/echo $name";
      $command1="'".$command."'";
      $last_line = system($command1, $retval);
  
      echo '&lt;/pre&gt;
      &lt;hr /&gt;Last line of the output: ' . $last_line . '
      &lt;hr /&gt;Return value: ' . $retval;        
   }
  </code></pre>
  
  <p>When I run this code, I'm getting the following errors:</p>
  
  <pre><code>in browser - giving code : 127  
  
  
  in /var/log/httpd/error_log file - sh: /usr/bin/echo John: No such file or directory  
  </code></pre>
  
  <p>Am I missing anything?<br>
  Thanks in advance. </p>