httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david jone <davidjone2...@gmail.com>
Subject Re: centOS apache module Vs. ubuntu apache module
Date Fri, 19 Aug 2011 09:17:02 GMT
First, very thanks for members of the modules-dev's mailist for detailed
reply.
Maybe I should locate the problem within more smaller within more limited
range.
In the reply for me, you mentioned that there may be differences in library
which used in compiling apache2 DSO module  between centos with apache2
V2.2.19
and ubuntu with apache2 V2.2.14.
But in fact, first I can use apxs(apxs2)  -i -c -a mod_xxx.c xx.c xxx.c
successfully in  centos with apache2 V2.2.19
and ubuntu with apache2 V2.2.14 respectively.
Second, I also can use LoadModule directive to load my module and then
restart apache2 successfully. As far as I known, when restarting , apache2
will loading its module's argument(if there are argument needed in modules C
source file).So, I can restart apache2 successfully which indicates that
apache2 can load or fetch
  each module's argument including my own module.
But, as a result, my module can't fetch its argument.

What's more, I am not very clear about the use of apache2 module argument,
even if I have read about this on The Apache Module Book(author: NICK KEW).
More detailed is about the two main module argument struct, per_server and
per_directory.
Is there any more materials about apache module development?
Thank you very much.

On Fri, Aug 19, 2011 at 2:06 PM, Ray Morris <support@bettercgi.com> wrote:

> > After then, first I directly move the compiled apache2 module .so
> > file to centOS with apache2 v2.2.19.
>
>
> Pick any non-trivial program and when compiled on one
> system it may not run another. You may have different
> library versions, for example. Certainly if glibc doesn't
> match you're going to have a problem. I tried to come up
> with a list of what matters for a super simple "hello world"
> Apache module but wasn't able to come up with a such a list.
> Since an Apache module isn't an executable, but rather
> becomes part of the Apache executable, any number of
> compile options could cause problems if they don't match
> between the two systems.
>
> You'll notice that software is generally distributed as
> either a) a compiled package such as an RPM or deb built
> for a specific version of a specific distribution or
> b) source code.
>
> > I wanna that whether there are differences between apxs and apxs2.
>
> It is my understanding, which may be wrong, that some distributions
> which have both Apache 2.x and Apache 1.3 packages available make
> that distinction. They call the Apache 2.x version of apxs "apxs2"
> so that you can easily run either, depending on which httpd you wish
> to compile for. It's the same tool, just renamed on some distributions.
> --
> Ray Morris
> support@bettercgi.com
>
> Strongbox - The next generation in site security:
> http://www.bettercgi.com/strongbox/
>
> Throttlebox - Intelligent Bandwidth Control
> http://www.bettercgi.com/throttlebox/
>
> Strongbox / Throttlebox affiliate program:
> http://www.bettercgi.com/affiliates/user/register.php
>
>
>
>
> On Fri, 19 Aug 2011 12:22:12 +0800
> david jone <davidjone2007@gmail.com> wrote:
>
> > Hello,
> >        everyone,recently I have a problem that a apache module
> > developed on ubuntu with apxs2 can't work on CentOS.
> > The more details as follows:
> > 1. The module thar first developed on Ubuntu OS with apache2 v2.2.14
> > using apxs2 compile tools, and then worked well. And I use
> > AP_INIT_TAKE1 to fetch module argument.
> >     All above is worked well.
> > After then, first I directly move the compiled apache2 module .so
> > file to centOS with apache2 v2.2.19.When I add LoadModule XXXXXX.so,
> > and restart apache2.As a result, an error message given that "ELF
> > format wrong". 2.And I recompile the module with all source files via
> > apxs (not apxs2 on ubuntu), and add LoadModule directive XXXXXX.so,
> > and restart apache2. Apache2 is started smoothly,but the module's
> > argument are not fetched right!
> >
> > I wanna that whether there are differences between apxs and apxs2.And
> > I also want to know why the module on centOS can't fetch module
> > argument right.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message