Re: [Mod-fcgid-users] Difficulty compiling mod-fcgid on centos 5

2008-06-04 Thread Andrew White
Wonderful, that link did the trick!!


-Original Message-
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Wed 6/4/2008 1:06 PM
To: mod-fcgid-users@lists.sourceforge.net
Subject: Re: [Mod-fcgid-users] Difficulty compiling mod-fcgid on centos 5
 
On Wed, 4 Jun 2008 13:16:37 -0500
"Andrew White" <[EMAIL PROTECTED]> wrote:

> 
> Hi,
> 
> I'm having a difficult time compiling mod-fcgid.  My Make file is
> this:
> 
> #
> #  Makefile for Apache2
> #
> 
> builddir = .
> 
> top_dir  = /usr/lib/httpd
> 
> top_srcdir   = ${top_dir}
> top_builddir = ${top_dir}
> VPATH = arch/unix/
> 
> #include ${top_builddir}/build/special.mk
> include ${top_builddir}/modules.mk
> 
> APXS  = apxs
> APACHECTL = apachectl
> EXTRA_CFLAGS = -I$(builddir)
> 
> all: local-shared-build
> 
> clean:
> rm -f *.o *.lo *.slo *.la arch/unix/*.o arch/unix/*.lo
> arch/unix/*.slo arch/unix/*.la .libs/* arch/unix/.libs/*
> 
> When I run the command I get this output:
> 
> [root@ mod_fcgid.2.2]# make top_dir=/usr/lib/httpd/
> make: *** No rule to make target `fcgid_bridge.slo', needed by
> `mod_fcgid.la'.  Stop.
> 
> If I uncomment "#include ${top_builddir}/build/special.mk" it just
> gives me an error that "special.mk" cannot be found.  I've researched
> into what special.mk is but haven't been able to find anything it
> doesn't come with the source code thats for sure.  Naturally there
> isn't any yum depositories I've been able to find with the module.
> 
> Any help is much appreciated!
> 
> Andrew

Do you have httpd-devel package installed?
Anyway, this package IS in a yum repo (in EPEL). There's a working one
here:
http://mirrors.xservers.ro/epel/5Server/i386/mod_fcgid-2.2-4.el5.i386.rpm

Good luck!

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

<>-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


Re: [Mod-fcgid-users] Apache consuming all available memory

2008-06-04 Thread Frank Costanza
Hi Gabriel,

I don't mind so much that Apache/mod_fcgid buffers the entire input, but even 
after the upload has completed and the input has been passed to the fastcgi 
application, Apache has still not freed the memory.  Subsequent uploads just 
keep adding to the overall Apache memory usage.

Unfortunately in my situation, I cannot simply tell the system not to use 
fastcgi for upload scripts as the system is used to host PHP sites for 
customers.  I guess my only option at this stage is to limit Apache memory 
using ulimit.


--- On Thu, 5/6/08, Gabriel Barazer <[EMAIL PROTECTED]> wrote:

> From: Gabriel Barazer <[EMAIL PROTECTED]>
> Subject: Re: [Mod-fcgid-users] Apache consuming all available memory
> To: [EMAIL PROTECTED], mod-fcgid-users@lists.sourceforge.net
> Date: Thursday, 5 June, 2008, 3:05 AM
> Hi,
> 
> I have reported that problem about a year ago and yes, this
> is still not 
> fixed. Essentially this is because the fix needs _a lot_ of
> changes in 
> the module core functions, because the whole logic has to
> be rewritten. 
> In the current code, mod_fcgid buffers the entire input
> data before 
> testing the input size (which makes MaxRequestLen useless)
> and no data 
> can be transmitted to the fastcgi process because it
> doesn't even exist 
> yet (the process spawning logic is done after the input
> data is 
> buffered). Even though the fastcgi process would already
> exist, the 
> input request is not bridged to it before the buffering
> step (meaning: 
> you cannot avoid the big memory buffering in any way).
> 



  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


Re: [Mod-fcgid-users] Difficulty compiling mod-fcgid on centos 5

2008-06-04 Thread [EMAIL PROTECTED]
On Wed, 4 Jun 2008 13:16:37 -0500
"Andrew White" <[EMAIL PROTECTED]> wrote:

> 
> Hi,
> 
> I'm having a difficult time compiling mod-fcgid.  My Make file is
> this:
> 
> #
> #  Makefile for Apache2
> #
> 
> builddir = .
> 
> top_dir  = /usr/lib/httpd
> 
> top_srcdir   = ${top_dir}
> top_builddir = ${top_dir}
> VPATH = arch/unix/
> 
> #include ${top_builddir}/build/special.mk
> include ${top_builddir}/modules.mk
> 
> APXS  = apxs
> APACHECTL = apachectl
> EXTRA_CFLAGS = -I$(builddir)
> 
> all: local-shared-build
> 
> clean:
> rm -f *.o *.lo *.slo *.la arch/unix/*.o arch/unix/*.lo
> arch/unix/*.slo arch/unix/*.la .libs/* arch/unix/.libs/*
> 
> When I run the command I get this output:
> 
> [root@ mod_fcgid.2.2]# make top_dir=/usr/lib/httpd/
> make: *** No rule to make target `fcgid_bridge.slo', needed by
> `mod_fcgid.la'.  Stop.
> 
> If I uncomment "#include ${top_builddir}/build/special.mk" it just
> gives me an error that "special.mk" cannot be found.  I've researched
> into what special.mk is but haven't been able to find anything it
> doesn't come with the source code thats for sure.  Naturally there
> isn't any yum depositories I've been able to find with the module.
> 
> Any help is much appreciated!
> 
> Andrew

Do you have httpd-devel package installed?
Anyway, this package IS in a yum repo (in EPEL). There's a working one
here:
http://mirrors.xservers.ro/epel/5Server/i386/mod_fcgid-2.2-4.el5.i386.rpm

Good luck!

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


[Mod-fcgid-users] Difficulty compiling mod-fcgid on centos 5

2008-06-04 Thread Andrew White

Hi,

I'm having a difficult time compiling mod-fcgid.  My Make file is this:

#
#  Makefile for Apache2
#

builddir = .

top_dir  = /usr/lib/httpd

top_srcdir   = ${top_dir}
top_builddir = ${top_dir}
VPATH = arch/unix/

#include ${top_builddir}/build/special.mk
include ${top_builddir}/modules.mk

APXS  = apxs
APACHECTL = apachectl
EXTRA_CFLAGS = -I$(builddir)

all: local-shared-build

clean:
rm -f *.o *.lo *.slo *.la arch/unix/*.o arch/unix/*.lo arch/unix/*.slo 
arch/unix/*.la .libs/* arch/unix/.libs/*

When I run the command I get this output:

[root@ mod_fcgid.2.2]# make top_dir=/usr/lib/httpd/
make: *** No rule to make target `fcgid_bridge.slo', needed by `mod_fcgid.la'.  
Stop.

If I uncomment "#include ${top_builddir}/build/special.mk" it just gives me an 
error that "special.mk" cannot be found.  I've researched into what special.mk 
is but haven't been able to find anything it doesn't come with the source code 
thats for sure.  Naturally there isn't any yum depositories I've been able to 
find with the module.

Any help is much appreciated!

Andrew
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


Re: [Mod-fcgid-users] Apache consuming all available memory

2008-06-04 Thread Gabriel Barazer
Hi,

I have reported that problem about a year ago and yes, this is still not 
fixed. Essentially this is because the fix needs _a lot_ of changes in 
the module core functions, because the whole logic has to be rewritten. 
In the current code, mod_fcgid buffers the entire input data before 
testing the input size (which makes MaxRequestLen useless) and no data 
can be transmitted to the fastcgi process because it doesn't even exist 
yet (the process spawning logic is done after the input data is 
buffered). Even though the fastcgi process would already exist, the 
input request is not bridged to it before the buffering step (meaning: 
you cannot avoid the big memory buffering in any way).

We have really no choice but to redesign from scratch that part of the 
module, which is for a 
opensource-unsponsored-minor-project-used-by-3-people-on-earth-and-feeling-alone
 
is very long.

At least for the time being, there is no developer working actively on 
the project, so any help is welcome.

The only workaround at the moment is not to use fastcgi for uploading. 
You can rename your upload script to another extension or playing with 
.htaccess file to do that.

I'm working on a complete rewrite of this module but because we are 
really caring about the process design, this will take a while before 
going public.

Gabriel

On 06/04/2008 1:39:59 PM +0200, Frank Costanza <[EMAIL PROTECTED]> 
wrote:
> Several people in the past have reported problems with large uploads
> and Apache consumimg all available memory.
> 
> Although it is claimed that "MaxRequestInMem" and "MaxRequestLen" introduced
> in mod_fcgid 2.2 can be used to overcome this memory consumption problem,
> it appears that it does not work as intended and the bug remains.
> 
> Essentially this can quickly and easily result in a DoS attack.
> 
> Memory of the Apache child process appears to increase by approximately 
> the size
> of the file being uploaded.  For example, if I upload a 100MB file the 
> Apache child
> will grow by around 100MB of memory.
> 
> I'm not much of a programmer, but I've taken a look at the code.  In 
> fcgid_bridge.c,
> line 552, there is the following:
> 
> if (request_size > max_mem_request_len) {
> 
> Just before this line is executed, I added a line in source code to log 
> the values
> of 'request_size' and 'max_mem_request_len'.  The value of request_size 
> is usually 8000
> but is sometimes less than that, but never more than 8000.  The value of 
> max_mem_request_len is 65536, which is the default value (64KB).
> 
> Therefore, as request_size is not greater than max_mem_request_len, the 
> block of code added to use a temporary file is never executed.
> 
> I'm using these versions on a Linux system
> 
> Apache 2.2.8
> mod_fcgid 2.2
> PHP 5.2.6
> 
> 
> I would greatly appeciate if the mod_fcgid developers could take another 
> look this
> problem.  I am willing to test any patches in order to assist with 
> fixing this problem.
> 
> Regards
> -Frank
> 
> 
> 
> Sent from Yahoo! Mail 
> .
>  
> 
> A Smarter Email.
> 
> 
> 
> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> 
> 
> 
> 
> ___
> Mod-fcgid-users mailing list
> Mod-fcgid-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


[Mod-fcgid-users] Apache consuming all available memory

2008-06-04 Thread Frank Costanza
Several people in the past have reported problems with large uploads
and Apache consumimg all available memory.

Although it is claimed that "MaxRequestInMem" and "MaxRequestLen" introduced
in mod_fcgid 2.2 can be used to overcome this memory consumption problem,
it appears that it does not work as intended and the bug remains.

Essentially this can quickly and easily result in a DoS attack.

Memory of the Apache child process appears to increase by approximately the size
of the file being uploaded.  For example, if I upload a 100MB file the 
Apache child 
will grow by around 100MB of memory.

I'm not much of a programmer, but I've taken a look at the code.  In 
fcgid_bridge.c,
line 552, there is the following:

if (request_size > max_mem_request_len) {

Just before this line is executed, I added a line in source code to log the 
values
of 'request_size' and 'max_mem_request_len'.  The value of request_size is 
usually 8000
but is sometimes less than that, but never more than 8000.  The value of 
max_mem_request_len is 65536, which is the default value (64KB).

Therefore, as request_size is not greater than max_mem_request_len, the block 
of code added to use a temporary file is never executed.

I'm using these versions on a Linux system

Apache 2.2.8
mod_fcgid 2.2
PHP 5.2.6


I would greatly appeciate if the mod_fcgid developers could take another look 
this
problem.  I am willing to test any patches in order to assist with fixing 
this problem.

Regards
-Frank




  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users