Re: mod_proxy_fdpass + httpd-2.2.19

2011-08-03 Thread Nick Kew

On 3 Aug 2011, at 10:26, Henrik Strand wrote:

> Hmm, but this is how the code looks like when I get the error that I
> posted. 

In that case, you've compiled it against the wrong headers.
The best solution is usually to use apxs from the installed version
to compile new modules.

That error message is your module failing a test that it was compiled
against the correct API version and is therefore compatible with
the server that's loading it.

-- 
Nick Kew



Re: mod_proxy_fdpass + httpd-2.2.19

2011-08-03 Thread Rainer Jung
On 03.08.2011 09:48, Tony Abo wrote:
>> From: Henrik Strand [mailto:henrik.str...@axis.com]
>> Sent: Wednesday, 3 August 2011 5:10 PM
>> To: modules-dev@httpd.apache.org
>> Subject: mod_proxy_fdpass + httpd-2.2.19
>>
>> Hi,
>>
>> I'm trying to back-port Apache Module mod_proxy_fdpass to httpd-2.2.19,
>> and building from source, but are getting the following error message
>> when starting apachectl:
>>
>> httpd: Module "(null)" is not compatible with this version of Apache
>> (found 0, need 20051115). Please contact the vendor for the correct
>> version.
>>
>>
>> I've been googling an answer but only found that I should contact the
>> module vendor, which in this case would be me?! =)
>>
>> How can I fix this?
>>
>>
>> Thanks in advance.
>>
>> Best Regards,
>> Henrik
>>
> 
> Does the module data that you pass to ap_get_module_config() have the 
> constants MODULE_MAGIC_NUMBER_MAJOR and MODULE_MAGIC_NUMBER_MINOR in the 
> first two elements? I think that is where the 20051115 should be coming from. 
> The module name should be in that structure too. Maybe you are using compiler 
> switches that are making int be 32 bit instead of 64 bit--thus confusing the 
> data in the structure?

Trunk uses

...

AP_DECLARE_MODULE(proxy_fdpass) = {
STANDARD20_MODULE_STUFF,
...

The 2.2. branch uses:


module AP_MODULE_DECLARE_DATA proxy_connect_module = {
STANDARD20_MODULE_STUFF,

The change for trunk was necessary to support per module log levels.

Although the page is meant for upgrading and not for backporting,

http://httpd.apache.org/docs/trunk/en/developer/new_api_2_4.html

might be useful for you.

Regards,

Rainer



Re: mod_proxy_fdpass + httpd-2.2.19

2011-08-03 Thread Henrik Strand
Hmm, but this is how the code looks like when I get the error that I
posted. 

Is the module initialization done with the below code, or do I need to
add that explicitly?

Best Regards,
Henrik

On Wed, 2011-08-03 at 10:41 +0200, Nick Kew wrote:
> On 3 Aug 2011, at 09:27, Henrik Strand wrote:
> 
> > module AP_MODULE_DECLARE_DATA proxy_fdpass = {
> >STANDARD20_MODULE_STUFF,
> >NULL,   /* create per-directory config structure
> > */
> >NULL,   /* merge per-directory config structures
> > */
> >NULL,   /* create per-server config structure */
> >NULL,   /* merge per-server config structures */
> >NULL,   /* command apr_table_t */
> >register_hooks  /* register hooks */
> > };
> 
> That should be fine, compiled against the right (2.2.x) headers.
> 




Re: mod_proxy_fdpass + httpd-2.2.19

2011-08-03 Thread Nick Kew

On 3 Aug 2011, at 09:27, Henrik Strand wrote:

> module AP_MODULE_DECLARE_DATA proxy_fdpass = {
>STANDARD20_MODULE_STUFF,
>NULL,   /* create per-directory config structure
> */
>NULL,   /* merge per-directory config structures
> */
>NULL,   /* create per-server config structure */
>NULL,   /* merge per-server config structures */
>NULL,   /* command apr_table_t */
>register_hooks  /* register hooks */
> };

That should be fine, compiled against the right (2.2.x) headers.

-- 
Nick Kew


Re: mod_proxy_fdpass + httpd-2.2.19

2011-08-03 Thread Henrik Strand
Hi Nick,

Yes, that's right.

// AP_DECLARE_MODULE(proxy_fdpass) = { 
module AP_MODULE_DECLARE_DATA proxy_fdpass = {
STANDARD20_MODULE_STUFF,
NULL,   /* create per-directory config structure
*/
NULL,   /* merge per-directory config structures
*/
NULL,   /* create per-server config structure */
NULL,   /* merge per-server config structures */
NULL,   /* command apr_table_t */
register_hooks  /* register hooks */
};

Would it be possible to backport the macro, or relevant parts of it, in
order to initiate the module?

Best Regards,
Henrik

On Wed, 2011-08-03 at 10:07 +0200, Nick Kew wrote:
> On 3 Aug 2011, at 08:10, Henrik Strand wrote:
> 
> > Hi,
> > 
> > I'm trying to back-port Apache Module mod_proxy_fdpass to httpd-2.2.19,
> > and building from source, but are getting the following error message
> > when starting apachectl:
> > 
> > httpd: Module "(null)" is not compatible with this version of Apache
> > (found 0, need 20051115). Please contact the vendor for the correct
> > version.
> 
> Guessing in the dark 
> 
> You declare the module with
> module AP_MODULE_DECLARE_DATA proxy_fdpass_module;
> 
> But you don't instantiate it.  The macro commonly used in trunk
> doesn't exist in 2.2.
> 




Re: mod_proxy_fdpass + httpd-2.2.19

2011-08-03 Thread Nick Kew

On 3 Aug 2011, at 08:10, Henrik Strand wrote:

> Hi,
> 
> I'm trying to back-port Apache Module mod_proxy_fdpass to httpd-2.2.19,
> and building from source, but are getting the following error message
> when starting apachectl:
> 
> httpd: Module "(null)" is not compatible with this version of Apache
> (found 0, need 20051115). Please contact the vendor for the correct
> version.

Guessing in the dark 

You declare the module with
module AP_MODULE_DECLARE_DATA proxy_fdpass_module;

But you don't instantiate it.  The macro commonly used in trunk
doesn't exist in 2.2.

-- 
Nick Kew




RE: mod_proxy_fdpass + httpd-2.2.19

2011-08-03 Thread Tony Abo
> From: Henrik Strand [mailto:henrik.str...@axis.com]
> Sent: Wednesday, 3 August 2011 5:10 PM
> To: modules-dev@httpd.apache.org
> Subject: mod_proxy_fdpass + httpd-2.2.19
> 
> Hi,
> 
> I'm trying to back-port Apache Module mod_proxy_fdpass to httpd-2.2.19,
> and building from source, but are getting the following error message
> when starting apachectl:
> 
> httpd: Module "(null)" is not compatible with this version of Apache
> (found 0, need 20051115). Please contact the vendor for the correct
> version.
> 
> 
> I've been googling an answer but only found that I should contact the
> module vendor, which in this case would be me?! =)
> 
> How can I fix this?
> 
> 
> Thanks in advance.
> 
> Best Regards,
> Henrik
> 

Does the module data that you pass to ap_get_module_config() have the constants 
MODULE_MAGIC_NUMBER_MAJOR and MODULE_MAGIC_NUMBER_MINOR in the first two 
elements? I think that is where the 20051115 should be coming from. The module 
name should be in that structure too. Maybe you are using compiler switches 
that are making int be 32 bit instead of 64 bit--thus confusing the data in the 
structure?