Re: (resend) RE: mod_ssl

2007-12-14 Thread Mads Toftum
On Thu, Dec 13, 2007 at 09:50:46PM -0500, Hammer, Tim wrote:
> I am attempting to upgrade httpd from 1.3.x to 2.2.x for our web
> application. I have managed to get everything building and working,
> 
...

> As you can see, the call from mod_ssl.so into the buckets/ code is
> passing a null pointer. None of our other modules have been modified to
> use buckets. Does mod_ssl require the use of buckets?
>  
Are you trying to port mod_ssl from 1.3.x to 2.2.x?
That's been done long ago and 2.x includes a port of mod_ssl.

vh

Mads Toftum
-- 
http://soulfood.dk


Re: Connection Pool Module

2007-12-14 Thread Nick Kew
On Fri, 14 Dec 2007 08:35:12 -0500
"Mike O'Leary" <[EMAIL PROTECTED]> wrote:

> I am looking to write an Apache module that maintains a pool of socket
> connections to a back-end server.

mod_proxy does that.

Alternatively, you could look at mod_dbd, which maintains a pool
of database connections.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/


Re: Specifying a different target directory for APXS

2007-12-14 Thread Subra A Narayanan
Hello folks,

Has anyone come across a similar situation before? Can a target folder be
specified or is that not possible?

Any help is greatly appreciated.

Subra

On Dec 13, 2007 12:05 PM, Subra A Narayanan <[EMAIL PROTECTED]> wrote:

> Hello folks,
>
> I use the following command to compile my apache module:
>
> */usr/sbin/apxs -c mod_my.c*
>
>
> this creates a *.libs/* folder and my mod_my.so file is generated in that
> folder.
>
> My question is, is it possible to specify a different target folder for my
> .so file?
>
> I have gone through the man page for apxs and wasn't able to find
> anything.
>
>
> thanks in advance,
> Subra
>


Re: Specifying a different target directory for APXS

2007-12-14 Thread Subra A Narayanan
Joe,

Thanks for ur response.

The reason I wanted to change the target directory was because my apache
module is being compiled as one of the components of a much larger makefile.
All the other shared libraries generated by this make file, are copied in a
particular directory and hence I wanted my apache module to go in to that
directory as well. As you suggested, I could copy the .so file to whatever
directory I want later on, but I am not sure if such copying ig generally
done in a makefile.

I did try to directly use gcc to compile my apache module so that I could
specify any target directory but ran in to another issue which is detailed
here =>
http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200711.mbox/[EMAIL 
PROTECTED]

I didnt receive any helpful responses to that posting thats why I am trying
to use apxs.

Would you care to take a look at this issue =>
http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200711.mbox/[EMAIL 
PROTECTED]


Thanks so much!

Subra

On Dec 14, 2007 9:27 AM, Joe Lewis <[EMAIL PROTECTED]> wrote:

> Subra A Narayanan wrote:
> > Hello folks,
> >
> > Has anyone come across a similar situation before? Can a target folder
> be
> > specified or is that not possible?
> >
> > Any help is greatly appreciated.
> >
> > Subra
> >
>
> The .libs directory is specified by the libtool command, not by the apxs
> tool.  However, this is probably not what you really want.  Perhaps
> running an apxs -i command to INSTALL the module.
>
> Your apxs -c command is merely compiling the module.  The apxs -i
> command installs the module into the appropriate apache directory
> (configured when you compiled apache the first time [if RPM, when the
> RPM was built]).
>
> If you really must change the directory, then you can manually edit the
> file specified by the `apr-config --apr-libtool` command, and change the
> objdir parameter.  But, don't ask us for any help if this causes your
> system to no longer compile apache or apache modules (or even run apache
> or compile other processes that require the libtool command, or things
> to blow up).  No one in their right mind is going to touch that.
>
> It is easy enough to copy the .so file to where you need it once (unless
> you are installing it, then it's easy enough to just use a -i parameter
> to apxs to install the module).
>
> Good luck,
> Joe
> --
> Joseph Lewis 
> "Divide the fire, and you will sooner put it out." - Publius Syrus
>


RE: (resend) RE: mod_ssl

2007-12-14 Thread Hammer, Tim

> On Thu, Dec 13, 2007 at 09:50:46PM -0500, Hammer, Tim wrote:
> > I am attempting to upgrade httpd from 1.3.x to 2.2.x for our web 
> > application. I have managed to get everything building and working,
> > 
> ...
> 
> > As you can see, the call from mod_ssl.so into the buckets/ code is 
> > passing a null pointer. None of our other modules have been 
> modified 
> > to use buckets. Does mod_ssl require the use of buckets?
> >  
> Are you trying to port mod_ssl from 1.3.x to 2.2.x?
> That's been done long ago and 2.x includes a port of mod_ssl.

No, I am trying to use the new (2.2.x) mod_ssl with our modules that
have been "ported" from 1.3.x to 2.2.x. However, the "port" did not
convert our modules to use buckets and I am wondering if the new mod_ssl
is requiring the content generator(s) (our modules) to have created a
brigade.

> 
> vh
> 
> Mads Toftum


.Tim
Xerox Corporation, Office Group

Phone: 585/427-1684
Fax: 585/427-3244
Email:  [EMAIL PROTECTED]
Addr:  M/S 0801-80A
   1350 Jefferson Road
   Rochester, NY  14623
This e-mail message, including any attachments, is for the sole use of
the intended recipient(s) and may contain confidential information. Any
unauthorized review, use, disclosure or distribution is prohibited. If
you are not the intended recipient(s) please contact the sender by reply
e-mail and destroy all copies of the original message.
Thank you.


Re: Specifying a different target directory for APXS

2007-12-14 Thread Joe Lewis
Subra A Narayanan wrote:
> I didnt receive any helpful responses to that posting thats why I am trying
> to use apxs.
>   

You DID get helpful responses - I was one of those responders who said
to use apxs.  (We pointed you to the tool because there are too many
changes across systems, platforms, etc, that it is faster, more
efficient, and better quality to use a tool that also makes the end
result more portable - go figure).

> Would you care to take a look at this issue =>
> http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200711.mbox/[EMAIL 
> PROTECTED]
>   

We need no more discussion on that - use apxs.  If you need a Makefile,
use the apxs tool in your Makefile.  (It IS possible, after all.)  For
example, Makefile rules might look like :

mod_test.so:
apxs -c mod_test.so
cp .libs/mod_test.so path/to/mod_test.so

install:
apxs -n mod_test -i mod_test.la

That is how I have done all of my modules.  It's easier to type "make
install" rather than "apxs -i -a -c mod_test.c".  If you think you need
help in your makefile, go to google, and type in "makefile".  Just
copying a makefile from another package seriously limits your capabilities.

Joe
-- 
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus


Re: (resend) RE: mod_ssl

2007-12-14 Thread Mads Toftum
On Fri, Dec 14, 2007 at 11:01:09AM -0500, Hammer, Tim wrote:
> No, I am trying to use the new (2.2.x) mod_ssl with our modules that
> have been "ported" from 1.3.x to 2.2.x. However, the "port" did not
> convert our modules to use buckets and I am wondering if the new mod_ssl
> is requiring the content generator(s) (our modules) to have created a
> brigade.
> 
Ah. And everything works when mod_ssl is left out?

vh

Mads Toftum
-- 
http://soulfood.dk


Re: Specifying a different target directory for APXS

2007-12-14 Thread Subra A Narayanan
Joe,

Thanks for ur reply.

Let me clarify somethingWhen I said I didnt get any helpful responses, I
meant I didn't get any answers as to what is wrong with gcc and why the
module was behaving the way it was.

Anywayspoint taken.will use apxs for compiling the module.

Subra

On Dec 14, 2007 12:12 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:

> Subra A Narayanan wrote:
> > I didnt receive any helpful responses to that posting thats why I am
> trying
> > to use apxs.
> >
>
> You DID get helpful responses - I was one of those responders who said
> to use apxs.  (We pointed you to the tool because there are too many
> changes across systems, platforms, etc, that it is faster, more
> efficient, and better quality to use a tool that also makes the end
> result more portable - go figure).
>
> > Would you care to take a look at this issue =>
> >
> http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200711.mbox/[EMAIL 
> PROTECTED]
> >
>
> We need no more discussion on that - use apxs.  If you need a Makefile,
> use the apxs tool in your Makefile.  (It IS possible, after all.)  For
> example, Makefile rules might look like :
>
> mod_test.so:
>apxs -c mod_test.so
>cp .libs/mod_test.so path/to/mod_test.so
>
> install:
>apxs -n mod_test -i mod_test.la
>
> That is how I have done all of my modules.  It's easier to type "make
> install" rather than "apxs -i -a -c mod_test.c".  If you think you need
> help in your makefile, go to google, and type in "makefile".  Just
> copying a makefile from another package seriously limits your
> capabilities.
>
> Joe
> --
> Joseph Lewis 
> "Divide the fire, and you will sooner put it out." - Publius Syrus
>


Re: Specifying a different target directory for APXS

2007-12-14 Thread Ralf Mattes
On Fri, 2007-12-14 at 08:07 -0500, Subra A Narayanan wrote:
> Hello folks,

Hello folk,

your "problem" has nothing to do with apxs. The .libs directory is
created by libtool. You might want to contact the helpful dwellers on
the libtool mailing list.

> Has anyone come across a similar situation before? Can a target folder be
> specified or is that not possible?

Never needed to change that part of the build process. 

HTT Ralf Mattes

> Any help is greatly appreciated.
> 
> Subra
> 
> On Dec 13, 2007 12:05 PM, Subra A Narayanan <[EMAIL PROTECTED]> wrote:
> 
> > Hello folks,
> >
> > I use the following command to compile my apache module:
> >
> > */usr/sbin/apxs -c mod_my.c*
> >
> >
> > this creates a *.libs/* folder and my mod_my.so file is generated in that
> > folder.
> >
> > My question is, is it possible to specify a different target folder for my
> > .so file?
> >
> > I have gone through the man page for apxs and wasn't able to find
> > anything.
> >
> >
> > thanks in advance,
> > Subra
> >



Re: Specifying a different target directory for APXS

2007-12-14 Thread Ralf Mattes
On Fri, 2007-12-14 at 11:05 -0500, Subra A Narayanan wrote:
> Joe,
> 
> Thanks for ur response.
> 
> The reason I wanted to change the target directory was because my apache
> module is being compiled as one of the components of a much larger makefile.
> All the other shared libraries generated by this make file, are copied in a
> particular directory and hence I wanted my apache module to go in to that
> directory as well. As you suggested, I could copy the .so file to whatever
> directory I want later on, but I am not sure if such copying ig generally
> done in a makefile.

That's the approach I would choose (I do for packaging my modules into
Debian packages). Why wouldn't you copy in a Makefile? Just add another
dependency:

your_very_Special_path/your_module.so: your_module.slo
cp .libs/your_module.so 
your_very_Special_path/your_module.so


> I did try to directly use gcc to compile my apache module so that I could
> specify any target directory but ran in to another issue which is detailed
> here =>
> http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200711.mbox/[EMAIL 
> PROTECTED]
> 
> I didnt receive any helpful responses to that posting thats why I am trying
> to use apxs.

I got the impression that everyone considered this a no-so-good
idea 

 HTH Ralf Mattes



Re: Specifying a different target directory for APXS

2007-12-14 Thread Joe Lewis
Subra A Narayanan wrote:
> Joe,
>
> Thanks for ur reply.
>
> Let me clarify somethingWhen I said I didnt get any helpful responses, I
> meant I didn't get any answers as to what is wrong with gcc and why the
> module was behaving the way it was.
>
> Anywayspoint taken.will use apxs for compiling the module.
>
> Subra
>   

Your -z initfirst, -fPIC and other flags may have been causing that. 
apxs is easier and faster.

Hopefully, that will work.

Joe
-- 
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus


Re: Specifying a different target directory for APXS

2007-12-14 Thread Subra A Narayanan
Ralf/Joe,

Now I am trying to (just) compile my module using apxs and I see this
warning

 *$ /usr/sbin/apxs -c -L /myprj/deps/axis2c/lib -L /myprj/lib/ -l
axutil -l axis2_engine -l dl -l pthread -l client -l operations -c
/myprj/obj/webservices/mod_my.o /myprj/obj/webservices/dispatcher.o
/myprj/obj/webservices/parserequest.o
/myprj/obj/webservices/response.o
/usr/lib/apr/build/libtool --silent --mode=link gcc -o
/myprj/obj/webservices/mod_my.la  -L /myprj/deps/axis2c/lib
-L/myprj/lib/ -laxutil -laxis2_engine -ldl -lpthread -lclient
-loperations -rpath /usr/lib/httpd/modules -module -avoid-version
/myprj/obj/webservices/mod_my.o /myprj/obj/webservices/dispatcher.o
/myprj/obj/webservices/parserequest.o
/myprj/obj/webservices/response.o

*** Warning: Linking the shared library
/myprj/obj/webservices/mod_my.la against the non-libtool
*** objects  /myprj/obj/webservices/mod_my.o
/myprj/obj/webservices/dispatcher.o
/myprj/obj/webservices/parserequest.o
/myprj/obj/webservices/response.o is not portable!*


Do you know what is causing this problem?

Thanks for all the responses!
Subra


On Dec 14, 2007 1:30 PM, Ralf Mattes <[EMAIL PROTECTED]> wrote:

> On Fri, 2007-12-14 at 11:05 -0500, Subra A Narayanan wrote:
> > Joe,
> >
> > Thanks for ur response.
> >
> > The reason I wanted to change the target directory was because my apache
> > module is being compiled as one of the components of a much larger
> makefile.
> > All the other shared libraries generated by this make file, are copied
> in a
> > particular directory and hence I wanted my apache module to go in to
> that
> > directory as well. As you suggested, I could copy the .so file to
> whatever
> > directory I want later on, but I am not sure if such copying ig
> generally
> > done in a makefile.
>
> That's the approach I would choose (I do for packaging my modules into
> Debian packages). Why wouldn't you copy in a Makefile? Just add another
> dependency:
>
> your_very_Special_path/your_module.so: your_module.slo
>cp .libs/your_module.so
> your_very_Special_path/your_module.so
>
>
> > I did try to directly use gcc to compile my apache module so that I
> could
> > specify any target directory but ran in to another issue which is
> detailed
> > here =>
> >
> http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200711.mbox/[EMAIL 
> PROTECTED]
> >
> > I didnt receive any helpful responses to that posting thats why I am
> trying
> > to use apxs.
>
> I got the impression that everyone considered this a no-so-good
> idea 
>
>  HTH Ralf Mattes
>
>


Re: Specifying a different target directory for APXS

2007-12-14 Thread Nick Kew
On Fri, 14 Dec 2007 16:57:28 -0500
"Subra A Narayanan" <[EMAIL PROTECTED]> wrote:

PLEASE LEARN TO POST!  In particular, don't append
someone else's post to yours.

> Now I am trying to (just) compile my module using apxs and I see this
> warning
> 
>  *$ /usr/sbin/apxs -c -L /myprj/deps/axis2c/lib -L /myprj/lib/ -l

Don't link that stuff in.  You're compiling a module, not the
kitchen sink.  Use LoadFile if you need extra libs.

> axutil -l axis2_engine -l dl -l pthread -l client -l operations -c

Some of those, like dl and pthread, should be accessed through APR.
Using them directly loses portability.

> /myprj/obj/webservices/mod_my.o /myprj/obj/webservices/dispatcher.o

Why have you called your source files [name].o?

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/


Memory issue in apache modules

2007-12-14 Thread John Zhang
When my module processes requests, I see a consistent
memory increase.  It is like the memories were never
released.  I am using the apr_* functions to allocate
memory (most of the time from the request->pool).  My
understanding is that memories will be reclaimed by
apache after the request is processed (so I do not
need to free/delete).  Anyone has any ideas?  Does
this have anything to do with keep alive?

Thanks,
John


Re: Memory issue in apache modules

2007-12-14 Thread Eric Covener
On Dec 14, 2007 6:05 PM, John Zhang <[EMAIL PROTECTED]> wrote:
> When my module processes requests, I see a consistent
> memory increase.  It is like the memories were never
> released.  I am using the apr_* functions to allocate
> memory (most of the time from the request->pool).  My
> understanding is that memories will be reclaimed by
> apache after the request is processed (so I do not
> need to free/delete).  Anyone has any ideas?  Does
> this have anything to do with keep alive?

It should level out as each thread in the process has had a chance to
run and allocate some memory for a range of requests.  MaxMemFree can
be used to return the heap memory that would otherwise be used by
subsequent requests on that thread.


-- 
Eric Covener
[EMAIL PROTECTED]


Re: Memory issue in apache modules

2007-12-14 Thread John Zhang

--- Eric Covener <[EMAIL PROTECTED]> wrote:
> 
> It should level out as each thread in the process
> has had a chance to
> run and allocate some memory for a range of
> requests.  MaxMemFree can
> be used to return the heap memory that would
> otherwise be used by
> subsequent requests on that thread.
> 
Thanks Eric,
But I see consistent memory increase when I load
the SAME page repeatedly.  So something is wrong with
my module.  But I do not know what.

Thanks again.
John


Re: Memory issue in apache modules

2007-12-14 Thread Ray Morris

I am using the apr_* functions to allocate
memory (most of the time from the request->pool).


  If there are few places where you allocate from
othr than the reqquest pool, I'd look at those first.
--
Ray B. Morris
[EMAIL PROTECTED]

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/





On 12/14/2007 05:05:24 PM, John Zhang wrote:

When my module processes requests, I see a consistent
memory increase.  It is like the memories were never
released.  I am using the apr_* functions to allocate
memory (most of the time from the request->pool).  My
understanding is that memories will be reclaimed by
apache after the request is processed (so I do not
need to free/delete).  Anyone has any ideas?  Does
this have anything to do with keep alive?

Thanks,
John