title: Cannot fopen network file (via UNC path) when running PHP in IIS
body: <p>I can't access/read a file located on a network shared folder when running this code in IIS. The folder in question is set up to allow all users. <em>If however, I run the php script through the command prompt it works fine.</em> Doing a shell_exec('whoami') through the command prompt yields the correct user but, through the browser it comes back empty.</p>
  
  <p>This is definitely something to do with setting up the proper permission or setting up the server with the right user or something along those line. I do not know much about servers so, any help on how to solve this problem or any experiment that would yield any clue is greatly appreciated.</p>
  
  <p>Below is the code which is very simple and strait forward (again is IIS 2003 server PHP 5.2)</p>
  
  <pre><code>&lt;?php 
  $theFile="\\\\192.168.0.16\\geo\\junk.txt"; #network file does not works
  #$theFile="junk.txt"; #local file works fine
  $handle = fopen($theFile, "r");
  if($handle){
      while (!feof($handle)){
          $buffer = fgets($handle);
          echo $buffer."&lt;br /&gt;";
      }
  }
  ?&gt;
  </code></pre>