httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: load data at server startup - is ap_hook_post_config() the right place?
Date Thu, 22 Mar 2007 13:46:27 GMT
On Thu, 22 Mar 2007 09:21:39 -0400
"Danie Qian" <> wrote:

>  I am new to module development but I want to develop a module so I
> can manage the uri of the thousand of sites more efficiently. What I
> want is to load a mysql table data into the memory of Apache server
> at its startup stage for fast processing of requests later.

1. Have you seen mod_vhost_dbi?
2. The normal way to access mysql is through mod_dbd.

Having said that, it's not clear whether either of those
is actually relevant to you.

>	 Mysql
> database access information will be set with configuration
> directives. My question is: 1. Is ap_hook_post_config(apr_pool_t *p,
> apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)  the right place
> to load the table?

Yes, probably.

 2. If it is, how can the hook functions access the
> data after it is loaded presumably in apr_pool_t *p?

Store it on your module's server config.

Nick Kew

Application Development with Apache - the Apache Modules Book

View raw message