title: PHP shell_exec() not executing -- no errors
body: <p>I created this DB Copy tool for my company, and everything is completely functional locally.  I rsync'ed it to our tool server and now it seems it is unable to execute the shell command I'm passing with shell_exec.</p>
  
  <pre><code>$command  = "/usr/bin/mysqldump -v -u$dbUser -p$dbPass ";
  $command .= "-h$sourceHost -P$sourcePort $sourceDB 2&gt;../data/dump.log ";
  $command .= "| /usr/bin/mysql -u$dbUser -p$dbPass ";
  $command .= "-h$targetHost -P$targetPort $targetDB 2&gt;../data/error.log";
  
  $output = shell_exec($command);
  </code></pre>
  
  <p>I capture the stderr output of the mysql dump, because that is actually used by mysqldump to show progress (dumping this table, dumping this table etc) and I read from that file on my page to show progress.</p>
  
  <p>Neither of the files specified are even being created.  This makes me think there is some sort of permissions issue.  However I can see that my directories all have the same permissions as others on this server for working tools.  Doesn't rule it out, but I'm not sure what to assess further.</p>
  
  <p>I tried changing shell_exec() to exec() and adding a variable to capture the output ( exec($command, $shellOutput) ) and $shellOutput was empty.</p>
  
  <p>I echo'd the command to be run, after it is formed by the script, and was able to run that on the server with no issues.</p>
  
  <p>I'm a bit at a loss here, as it's not even giving me any feedback to work with.  Any ideas on what I can try?</p>
  
  <p>To add context, this is a page that is being called by $.ajax to kick off this dump.  After this shell command, there is an echo of what db was copied, and that is returning.  So the page is being called correctly, it seems to only be the shell command itself that is simply not working.</p>
  
  <p>Thanks in advance.</p>
  
  <p>*Also worth noting that our directory structure is such that our www folder of our project is symlinked to the documentRoot of the server.</p>