title: php shell_exec command doesn't act like bash / returns an error
body: <p>This is my code:</p>
  
  <pre><code>$url = escapeshellarg("http://www.mysite.com");
  $command = shell_exec("xvfb-run -a -s '-screen 0 640x480x16' wkhtmltopdf --dpi 300  --page-size A4 $url /srv/www/mysite/public_html/tmp_pdf.pdf");
  $str = file_get_contents("/srv/www/mysite/public_html/tmp_pdf.pdf");
  header('Content-Type: application/pdf');
  header('Content-Length: '.strlen($str));
  header('Content-Disposition: inline; filename="pdf.pdf"');
  header('Cache-Control: private, max-age=0, must-revalidate');
  header('Pragma: public');
  ini_set('zlib.output_compression','0');
  die($str);
  </code></pre>
  
  <p>In my bash shell (using Debian) the command </p>
  
  <blockquote>
    <p>shell_exec("xvfb-run -a -s '-screen 0 640x480x16' wkhtmltopdf --dpi
    300  --page-size A4 html://www.mysite.com /srv/www/mysite/public_html/tmp_pdf.pdf</p>
  </blockquote>
  
  <p>works and it generates a pdf in the desired location but when i excecute the command in php nothing gets created and i'm returned to a null pdf file (because it doesn't exist).
  Can someone help me figure what is wrong?</p>