title: Ajax request to PHP page and exec(ssh....) not working
body: <p>I am posting to a php page using ajax (ignore the data posted, thats not important)</p>
  
  <p>When I run the php page on my linux server using the command: php addHit.php it correctly echoes out the hostname of the remote server. However this does not happen in ajax, all I get is a blank alert where the success function is. You can see it in action here: <a href="http://ec2-54-244-169-118.us-west-2.compute.amazonaws.com/bootstrap/jumbotron-narrow/index.php" rel="nofollow">http://ec2-54-244-169-118.us-west-2.compute.amazonaws.com/bootstrap/jumbotron-narrow/index.php</a></p>
  
  <pre><code>    &lt;script&gt;
          $(function() {  
              $("form[name=addHit]").submit(function() {  
                  alert("I am an alert box!");
                  var link = $("input[name=link]").val();
                  var comments = $("input[name=comments]").val();
                  var datastring = "link="+link+"&amp;comments="+comments;
                  alert(datastring);
                  $.ajax({
                      type: "POST",  
                      url: "/bootstrap/jumbotron-narrow/addHit.php",  
                      data: datastring,  
                      success: function(data, status, xhr) {  
                          alert(data);
                      }, 
                      error: function(httpRequest, textStatus, errorThrown) { 
                         alert("status=" + textStatus + ",error=" + errorThrown);
                      }
                  });  
                  alert("here");
                  return false;
              }); 
          });  
      &lt;/script&gt;
  </code></pre>
  
  <p>my addHit.php page</p>
  
  <pre><code>$commands = "ssh -i adoekey.pem ubuntu@ip-10-250-69-130.us-west-2.compute.internal hostname -f ";
  echo exec($commands);
  </code></pre>