title: How to set command line environment variable in PHP shell_exec
body: <p>The script I am trying to run via shell_exec in PHP requires an environmental variable to be set, which afaik is done via:</p>
  
  <pre><code>export VARIABLE=value
  </code></pre>
  
  <p>However, to run the script I am forced to do:</p>
  
  <pre><code>&lt;?PHP
  $sOutput = shell_exec("export VARIABLE=value &amp;&amp; my_command_goeth_hereth");
  </code></pre>
  
  <p>It seams kinda pointless to have to export the variable every time I run any commands. </p>
  
  <p>Is this the only way to do it, or am I missing a much simpler way?</p>