You are not logged in.

#1 2006-06-16 03:20:55

damjan
Member
Registered: 2006-05-30
Posts: 452

Apache 2.0.x and large file support (bigger than 2GB)

I've seen on the mail list people complaining that apache 2.0.55 can't serve files bigger than 2GB.

The sollution is to compile with this option:
export CPPFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
(and this is default in 2.2.x)

Now, an Apache compiled with those options is most probably not binary compatible with mod_php or mod_python or other out-of-tree apache modules, so they'll need recompileing too.

Now, I've noticed that /home/httpd/build/config_vars.mk needs to be patched too, so that the php and python modules pick up the setting when compiled.
You need to find the EXTRA_CPPFLAGS variable and add the two defines from above to it.. At the end it should look something like this:
EXTRA_CPPFLAGS = -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

BTW in lighttpd (well at least in 1.4.11) the --enable-lfs is enabled by default.

Offline

Board footer

Powered by FluxBB