Operating System - Linux
1753818 Members
8147 Online
108805 Solutions
New Discussion юеВ

Largefile Support in Apache 1.3

 
Allanm
Super Advisor

Largefile Support in Apache 1.3


We get segmentation fault when I try to access any files over 2GB on Apache 1.3.

I tried to compile apache using CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 in order to have Apache acknowledge files over 2GB but no luck I still got segmentation fault.

I read in a forum that you can hack Apache acknowledge files over 2GB. Does anybody know how to achieve this hack without upgrading Apache to 2.x.

Thanks,
Allan.
8 REPLIES 8
Allanm
Super Advisor

Re: Largefile Support in Apache 1.3

Please Help!
Steven Schweda
Honored Contributor

Re: Largefile Support in Apache 1.3

I know nothing, but a quick Google search for
apache 1.3 largefile
suggests that you need to change some things
in the source code to make this work.

As it says at "http://httpd.apache.org/"

[...]
Apache 2.2.11 Released 2008-12-14
[...]
New features include [...] Large File
Support, [...]


> [...] without upgrading Apache to 2.x.

Why do it the hard way?

> I read in a forum that you can hack [...]

Didn't it also say how to do it?

> I still got segmentation fault.

Not a useful problem description, by the way.
Steven E. Protter
Exalted Contributor

Re: Largefile Support in Apache 1.3

Shalom,

32 bit apache on a 32 bit OS supports 2 GB files, no bigger. To try and hack around this will cause near certain disaster.

Upgrading the apache to 2.x will not help, it has the exact same limitation.

If you install apache on a 64 bit Linux install, it will support larger files. You are really hitting an OS limit not an apache limit in this case.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Heironimus
Honored Contributor

Re: Largefile Support in Apache 1.3

Files and request bodies over 2GB on 32-bit UNIX platforms are officially supported in 2.2.

You could make large files work on 2.0 by adding the magic compile flags, but it was unsupported upstream so I wouldn't recommend it.

I wouldn't even try it with 1.3. You can probably get it to work, but the first thing people will tell you if you start having strange problems is "don't do that".
Steven Schweda
Honored Contributor

Re: Largefile Support in Apache 1.3

> 32 bit apache on a 32 bit OS supports 2 GB
> files, no bigger. [...]

This seems to me unlikely. C large-file
support depends mostly on a 64-bit "off_t"
type, which is, in general, unrelated to the
size of a pointer. (What does "a 32 bit OS"
mean (to you), exactly?)
Dennis Handly
Acclaimed Contributor

Re: Largefile Support in Apache 1.3

I tried to compile apache using CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 in

These are HP-UX specific defines and if they actually did anything in Linux, someone would be sued. :-)
Steven Schweda
Honored Contributor

Re: Largefile Support in Apache 1.3

> These are HP-UX specific defines [...]

http://www.tin.org/bin/man.cgi?section=7&topic=feature_test_macros

The wisdom cup here just runneth over,
doesn't it?


I'll admit that simply defining a few C
macros at compile time is not likely to do
the whole job on a program like Apache, but
spewing loads of nonsense is likely to do
even less good.
Andrew Cowan
Honored Contributor

Re: Largefile Support in Apache 1.3

Once you get get the correct OS level and filesystem you may also need to amend your user's ULIMIT settings or the kernel will prevent any process from creating files larger than this limit.