fopen fails to open +4GB file
fopen() returns null on large files above 4GB.
Solution: Compile your program with this flag:
CFLAGS+=-D_FILE_OFFSET_BITS=64
Or find the equivalent flag for your compiler.
I first experience this problem when using lighttpd to provide a .mp4 larger than 4G, it would fail with the error : 502 Bad Gateway.
From the sources :
* mod_fastcgi: Send 502 "Bad Gateway" if we couldn't open the file for X-Sendfile (fixes #2226)
Recent Comments