You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Garnier, Jeremie" <JG...@nds.com> on 2007/01/29 15:00:38 UTC

using Apache module

Hi all,

 

How can I use an apache module in a C application?

Is it possible to use mod_dbd? Actually there are some undefined references (ap_hook_post_config, ap_hook_child_init...).

Why the APR/APU in srclib of httpd 2.x are old versions and not APR/APU 1.3?
Thanks for your help...

 

Jérémie GARNIER

 

***********************************************************************************
Information contained in this email message is confidential and may be privileged, and is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster@nds.com and destroy the original message.
*********************************************************************************** 


RE: [users@httpd] using Apache module

Posted by "Garnier, Jeremie" <JG...@nds.com>.
Hi all,

I want to make a C application using apache module as i want to use mod_dbd in order to use mod_dbd (connection pooling).
I want to perform the connection to oracle. (I have configured apache in MPM worker mode.)

Jérémie 

-----Message d'origine-----
De : Sander Temme [mailto:sctemme@apache.org] 
Envoyé : lundi 29 janvier 2007 17:02
À : users@httpd.apache.org
Objet : Re: [users@httpd] using Apache module


On Jan 29, 2007, at 6:00 AM, Garnier, Jeremie wrote:

> How can I use an apache module in a C application?

Why would you want to do such a thing?

> Is it possible to use mod_dbd? Actually there are some undefined  
> references (ap_hook_post_config, ap_hook_child_init...).

You would have to provide all of the functions from the Apache core  
that the module calls, including all of the callback hooks.

I quickly browsed through the module, and it looks to me like a  
fairly thin glue layer on top of APR's DBD. If you want DBD  
functionality in your application, you're probably better off calling  
APR directly.

Since the Apache code is released under the Apache license, you  
should find no problem re-using some of it in your own application,  
outside the context of Apache.  Note: this does not constitute legal  
advice; read the Apache License <http://www.apache.org/licenses/ 
LICENSE-2.0> and make sure you agree to its terms.

> Why the APR/APU in srclib of httpd 2.x are old versions and not APR/ 
> APU 1.3?
> Thanks for your help...

Apache 2.0.x and 2.2.x use branches of APR: 0.9 and 1.2  
respectively.  This is done because we require that the APR API we  
use is stable.  The development trunk of Apache builds against the  
trunk of APR, and when we do the next major release we will likely  
use a new branch of APR.

S.


-- 
sctemme@apache.org            http://www.temme.net/sander/
Open Source Software Consultant
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



***********************************************************************************
Information contained in this email message is confidential and may be privileged, and is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster@nds.com and destroy the original message.
*********************************************************************************** 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] using Apache module

Posted by Sander Temme <sc...@apache.org>.
On Jan 29, 2007, at 6:00 AM, Garnier, Jeremie wrote:

> How can I use an apache module in a C application?

Why would you want to do such a thing?

> Is it possible to use mod_dbd? Actually there are some undefined  
> references (ap_hook_post_config, ap_hook_child_init…).

You would have to provide all of the functions from the Apache core  
that the module calls, including all of the callback hooks.

I quickly browsed through the module, and it looks to me like a  
fairly thin glue layer on top of APR's DBD. If you want DBD  
functionality in your application, you're probably better off calling  
APR directly.

Since the Apache code is released under the Apache license, you  
should find no problem re-using some of it in your own application,  
outside the context of Apache.  Note: this does not constitute legal  
advice; read the Apache License <http://www.apache.org/licenses/ 
LICENSE-2.0> and make sure you agree to its terms.

> Why the APR/APU in srclib of httpd 2.x are old versions and not APR/ 
> APU 1.3?
> Thanks for your help…

Apache 2.0.x and 2.2.x use branches of APR: 0.9 and 1.2  
respectively.  This is done because we require that the APR API we  
use is stable.  The development trunk of Apache builds against the  
trunk of APR, and when we do the next major release we will likely  
use a new branch of APR.

S.


-- 
sctemme@apache.org            http://www.temme.net/sander/
Open Source Software Consultant
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF