title: PHP scandir() Returns an Empty Array on Network Folder
body: <p>I am running <code>scandir($path)</code> where <code>$path</code> is a network location and it is behaving in a very strange manor. In my script, I have path as </p>
  
  <pre><code>$path = "\\\\server-name\\shared folder"
  $folders = scandir($path)
  </code></pre>
  
  <p>When I do a <code>var_dump($folders)</code> I get <code>array(0) {}</code> </p>
  
  <p>When this happens, I restart the <code>Apache 2.4</code> service and if I run the script again after restarting the service, I get the anticipated result. When the command <code>scandir()</code> fails, I can't get any records in the <code>error.log</code> file of apache folder in XAMPP.</p>
  
  <p>Could somebody explain why it works when the <code>Apache</code> service is restarted and why it stops working again after a while please?</p>
  
  <p>Additional Info: 
  Server - Windows Server 2008 R2 / PHP Version - 5.5.11</p>