title: shell_exec() - Error when executing php script
body: <p>When I'm trying to execute a PHP script using <code>shell_exec()</code>, it's not working.</p>
  
  <p>In the error_log file it shows:</p>
  
  <blockquote>
    <p>PHP Warning:  shell_exec() [function.shell-exec]: Unable to execute
    'php /home/snabbsam/public_html/.....</p>
  </blockquote>
  
  <p><strong>System</strong><br>
  Centos</p>
  
  <p><strong>shell_exec works with clamscan</strong><br>
  <code>shell_exec()</code> works on <code>clamscan()</code> function of clamav.<br>
  But it's not executing PHP script</p>
  
  <p><strong>Things I've checked:</strong>  </p>
  
  <ul>
  <li>PHP <code>safe_mode</code> is off</li>
  <li><code>shell_exec()</code> is not present in <code>disable_functions</code> in php.ini</li>
  <li>Tried giving executable permission to the file &amp; the parent folders as suggested in <a href="https://stackoverflow.com/a/8668666/402089">https://stackoverflow.com/a/8668666/402089</a></li>
  </ul>