title: PHP exec on a Windows with IIS configuration
body: <p>so I have read about 10 answers and everyone seems to suggest ideas which for some reason don't work.</p>
  
  <p>i am trying to execute a simple command line which is "svn update" but it is not working and it returns NULL</p>
  
  <p>so i have tried trial and error the way and for now this is what i can say;</p>
  
  <p>i have tried several commands like</p>
  
  <pre><code>&lt;?php
  exec ("cmd /c ping 127.0.0.1 -n 1 &gt; results.txt ");
  ?&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;?php
  exec ("cmd /c chdir &gt; results.txt ");
  ?&gt;
  </code></pre>
  
  <p>and both work.. infact chdir says the exact position where the php file executing the line is stored on the pc..</p>
  
  <p>so the problem now is, why do some commands like this:</p>
  
  <pre><code>&lt;?php
  exec ("cmd /c dir &gt; results.txt ");
  ?&gt;
  </code></pre>
  
  <p>don't work? this results and empty value even though inside the folder i have several files and directories.</p>
  
  <p>and why if i use the command prompt to move into the folder where the php file is store and type svn update it works and doing</p>
  
  <pre><code>&lt;?php
  exec ("cmd /c svn update &gt; results.txt ");
  ?&gt;
  </code></pre>
  
  <p>return a NULL?</p>
  
  <p>any help is really appreciated.</p>
  
  <p>it feels like i have some restrictions dued to the configuration setup because when i try in local using apache i can get most of the commands to work (shell_exec, system, exec, even without the cmd /c)</p>