PHP: Why would 'filetype()' and 'is_file()' fail reading a file on a FTP server?
<p>I'm having a few problems while trying to check files on a FTP server.</p>

<p>I installed a FTP server (filezilla) on a test machine where i could interact with it from another webserver running on the LAN. I used PHP to walk through the directories on the FTP server over the LAN. Within my app i had calls to 'filetype()' and more recently 'is_file()' to check file types etc.</p>

<p>Now i've deployed the app to another place and setup a FTP share on a NAS and run my app on a separate webserver connected to the LAN and here's where the problems start. My app now fails in the 'filetype()' and 'is_file()' calls. I have set the FTP share on the NAS to read/write.</p>

<blockquote>
  <p>'is_file()' = Silent, no error
  reported.</p>
  
  <p>'filetype()' = Warning: filetype()
  [function.filetype]: Lstat failed for
  <code>ftp://192.168.0.36/PDFs/6008300/6008386/v1/6008386.pdf</code>
  in C:\Program Files\Apache Software
  Foundation\Apache2.2\htdocs\app\app.php
  on line 326</p>
</blockquote>

<p>Any thoughts?</p>

<p>I can work around this error by not using the above functions but that lessens the safety of this script.</p>

<p>EDIT:</p>

<p>PHP is version 5.2.4</p>

<p>The FTP server doesn't require any login username or password.</p>
