title: Running shell_exec() in symfony
body: <p>I have a program that returns a comma-separated string of numbers after doing some background processing. I intended to run this in symfony using <code>shell_exec</code>; however, all I get is NULL (revealed through a <code>var_dump()</code>. I tried the following debugging steps.</p>
  
  <p>I ran the file (it's a PHP class) through a command-line lime unit test in Symfony - it works and gives the correct result there.</p>
  
  <p>Just to check, I tried a simple command <code>ls -l</code> at the same place to see whether I would get anything. Again, I had the same problem - the <code>var_dump</code> in the browser showed NULL, but it worked through the command line.</p>
  
  <p>What could be the problem? Are there restrictions on running <code>shell_exec()</code> in a browser?</p>
  
  <p>EDIT: Just to clarify, shell_exec() commands work when I run them as standalone php scripts on the web server (for example, by putting them in my document root. They don't seem to be working under the symfony framework, for some reason.</p>