List Info

Thread: problem with core_module on 2.2.x




problem with core_module on 2.2.x
user name
2006-03-31 15:37:16
Hello.

I'm developping my own module, and i have problem with this
line:

core_server_config      *conf =
ap_get_module_config(r->server->module_config,
&core_module)

when compiling:

mod_vhost.c:742: error: `core_server_config' undeclared
(first use in
this function)
mod_vhost.c:742: error: (Each undeclared identifier is
reported only once
mod_vhost.c:742: error: for each function it appears in.)
mod_vhost.c:742: error: `conf' undeclared (first use in
this function)
mod_vhost.c:742: error: `core_module' undeclared (first use
in this function)


Have got any idea how to fix it ?
Or what is wrong ?

Thanks
AK
problem with core_module on 2.2.x
user name
2006-03-31 16:41:43
On Friday 31 March 2006 16:37, Andrzej Kwiatkowski wrote:
> Hello.
>
> I'm developping my own module, and i have problem with
this line:
>
> core_server_config      *conf =
> ap_get_module_config(r->server->module_config,
&core_module)

Don't do that: you're breaking modularity, and going
outside the
API (which means a future update could break your module).

Use the public APIs (available from the headers in /include/
) instead.


-- 
Nick Kew
problem with core_module on 2.2.x
user name
2006-03-31 16:50:26
2006/3/31, Nick Kew <nickwebthing.com>:
> On Friday 31 March 2006 16:37, Andrzej Kwiatkowski
wrote:
> > Hello.
> >
> > I'm developping my own module, and i have problem
with this line:
> >
> > core_server_config      *conf =
> >
ap_get_module_config(r->server->module_config,
&core_module)
>
> Don't do that: you're breaking modularity, and going
outside the
> API (which means a future update could break your
module).
>
> Use the public APIs (available from the headers in
/include/ ) instead.
>
Hello.

ok. So i will describe my problem...
I'm developping mod_vhost module (http://kwiatek.eu.org
/mod_vhost).

Now i wan't to add function to set env variable
DOCUMENT_ROOT prior to document_root get from virtual
database.

Only way i've found is to user core_module config and set

conf->ap_document_root.

I there any other way ?

I've tried with:

apr_table_set(r->subprocess_env,
"DOCUMENT_ROOT", apr_pstrdup(r->pool,filter))

but i doesn't work.

Thanks
AK
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )