PHP strangeness

So, I just encountered a very strange issue with PHP’s FTP function and thought I’d take a quick sec to write about the problem, in case anyone else is having it.

Essentially we have a module in our application that moves a few files around via FTP.  Now this works fine on some servers, but some have problems – ftp_put returns ”, and creates a 0kb file on the remote FTP server.  Turns out – after much diagnosis, that enabling pasv mode in some cases fixes this problem (ftp_pasv).

Your Comment