Situation:
- Ubuntu 16.04
- PHP 7
- NFS share from an OpenVMS host
Trying to copy a file from the NFS share to a local directory.
The PHP copy()
function copies the file, but the resulting local file has a bunch of junk at the end of it. I suspect it's the allocated but unused area at the end of the physical OpenVMS file, but haven't proved that.
Using copy( 'ftp://...' )
results in
failed to open stream: FTP server reports 502 SIZE is unimplemented
file_put_contents( ..., file_get_contents( ... ))
does work, though.
Can somebody please explain to me why file_get_contents()
gets the correct data and copy() does not?