PHP's copy
function silently fails to copy any file over 2.41 GB. It returns boolean true
and doesn't log any kind of error, but the destination file is "cut off" at about 2.41 GB. Tested on 64-bit NTFS Windows 10.
This is not mentioned in the manual: https://www.php.net/copy
I almost wonder if this is some obscure bug which isn't normally supposed to happen. Is it perhaps Windows-only? Either way, it was really scary for me to find out that I had been "securely" backing up my > 2.41 GB files for ages which were all corrupted by being "cut off" silently.
It was never caught by me until sheer chance because it claimed to finish without an error and also didn't log/provoke any error message/signal.
Of course, this was run in a CLI PHP script (not WWW!) with infinite run time and RAM usage allowed.