Hi all,

im writing a module that stores data in a shared memory to set php conf values
and other in 'traslate_name' hook.. it works fine.

I decided to output the shm content within an http request using an handler
(like mod_status).

In configuration i have this:
<Location /output/>
sethandler "module_test_output"
</Location>

I setup the shm in post_config hook:
ap_hook_post_config(post_config_hook, NULL, NULL, APR_HOOK_REALLY_FIRST);

ending with the "post_config" hook function like this:
   ...
   conf->cache = apr_rmm_addr_get(rmm_addr, offset);
   conf->test_string = "costant string";
   return OK;
}


Within the translate_name hook the module access conf->cache correctly and
shm+rmm works well.

Problems come When i use "ap_get_module_config" within my 'shmoutput_handler':
conf->cache AND conf->test_string gives me a null pointers cauing segfaults.

My module is very similar to mod_shm_counter:
http://www.codemass.com/mod_shm_counter/downloads/mod_shm_counter.c

but my handler hook don't work.... do someone have an idea?

Thanks!

Reply via email to