Has anyone seen a problem when connecting to WS_FTP Server using the
following PHP code (or similar)?

<?

$filename = "ftp://user:[EMAIL PROTECTED]/somefile.txt";  //set filename to ftp
transport
$fp = fopen($filename,"r");                     //connect to file
$dataIn = fread($fp,4096);                      //read in 4096 bytes
echo "<br>DATAIN: " . strlen($dataIn)."<br>\n"; //print number of bytes read
into $dataIn buffer

?>

I always get back EXACTLY 1408 bytes - that's it.  The filesize has nothing
to do with it.  Regardless of what I try, I only get back 1408 bytes.  I
have a Netgear Router/Firewall at my server and suspect it may be mucking
the FTP commands sent by PHP?  But I can transfer files normally to and from
the server over FTP so I'm not sure what to think.  I tried the PHP script
with the same file on a different server and it worked fine, so I know the
script CAN work, unfortunately not where I NEED it to work.

The advantage of this method is that I don't have to transfer the whole file
(it's very large) to my webserver for processing.  I can just grab chunks of
it at a time over the FTP protocol and process it into my database.  I saw
one other mention of this problem by someone on the web, but no resolution
was forthcoming.

Any insight into this would be greatly appreciated.

Thanks,
Jonathan



Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.


An Archive of this list is available at:
http://www.mail-archive.com/wsftp_forum%40list.ipswitch.com/

Reply via email to