Readfile reads 0 bytes from large file?
问题 I'm trying to send a large file through readfile() . However, nothing is sent to the browser and readfile() returns 0 ( not false !). The file I'm trying to send is 4GiB of size and readable by PHP. I am setting set_time_limit(0) to allow a lengthy download process. I have tried to send the file in a while-loop contraption with fread() in 4K chunks and echo , but that aborts randomly (without error) after 500 - 2500 MiB downloaded and never manages to complete the download. The following test