Apache 2 support for files larger then 2GB

Recent patches for Solaris 10 operating system newly enable Apache 2 Web Server ability to serve files larger then 2GB:

120543-06 Synopsis: SunOS 5.10: Apache 2 Patch
120544-06 Synopsis: SunOS 5.10_x86: Apache 2 Patch

This change can be also found in OpenSolaris since bulid 46 (Nevada SFW project).

Why am I mentioning this? Because you might bump into some problems when upgrading to this version without proper reading of patch README file.

According to information from official Apache web pages you might get feeling that larger file support for 32 bits binaries is available from version 2.2 only. But it's not true as you can find out from Apache 2.0 ChangeLog. It's is fully functional from version 2.0.53.

But to have large file support working you have to use proper compilation environment (see lfcompile(5)). This for Solaris OS means to define macro _LARGEFILE_SOURCE to be 1 and _FILE_OFFSET_BITS to be 64.

And here comes the problem. Since these definitions change size of off_t which is used by different Apache modules and since we didn't use these macros before, all third party Apache 2 modules must be recompiled with these macros to run correctly. If you don't do it, you will most likely see Apache 2 Web Server crash with segfault during its start.

So, please recompile your modules and if you cannot use apxs to build entirely your module, you can obtain proper macro definitions issuing following command:

/usr/apache2/bin/apxs -q EXTRA_CPPFLAGS
-DSOLARIS2=11 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Enjoy sharing your DVD images and other big files via our Apache 2 :-)

Comments:

Post a Comment:
Comments are closed for this entry.
About

psum

Search

Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today