title: Php shell_exec() not running python script
body: <p>I am trying to run a python script from php code. I have followed other threads to see what I'm doing wrong, but i can't seem to find the problem.</p>
  
  <pre><code>$out = shell_exec(escapeshellcmd("/path/to/script/here/script.py arg1 arg2"));
  echo $out;
  </code></pre>
  
  <p>As you might ask, yes, the script:</p>
  
  <ol>
  <li>has "#!/usr/bin/env python3" added </li>
  <li>has permission to be read and executed by group www-data (from output apachectl -S)</li>
  <li>is executable</li>
  </ol>
  
  <p>At the same time, any other non-script command works just fine with <code>shell_exec()</code></p>