I'm using the following chunk of code to move files from a production server (where a db entry is parsed and dumped into an html shell, saved to .html) to a live server.
system("ncftpput -u USERNAME -p PASSWORD HOST_SERVER HOST_FILE_LOCATION(path) LOCAL_FILE_LOCATION(path)");
Of course the values above were removed (not gonna put my whole ftp login online, am I?), but the point can be seen.
The code 'works' to the effect that the correct file IS ftp'd, but NOT in it's entirety. Quite randomly, chucks of code are left off the destination file, such as the last twenty or so lines, as many as 100 lines of code...
I say randomly because I've counted bytes, and there's no order (I'd understand that if after say, 20k, the stream closes, but 20k is not standard to the filesizes).
Any ideas? This only happens on this one chunk of code, yet I use ncftp all over the site, to ftp images upon upload to the production server (their filesize and dimensions are checked, if ok, they're passed to the live server)... ?