Re: Share data between apache modules

2015-05-10 Thread Yann Ylavic
Hi Eugene, this should work... We need more of your code and/or logging to figure out what's going on. Maybe could you also log r and r-notes (with format %pp) to see if the two modules really share the same request? Regards, Yann. On Sat, May 9, 2015 at 6:40 PM, Eugene Teslenko

Re: Share data between apache modules

2015-05-10 Thread Yann Ylavic
I don't know much about mod_fastcgi (third-party module), but it seems that it uses ap_internal_redirect[_handler](). This creates a new (redirect) request which is linked with the original one through the r-next (= newr) and newr-prev (= r). Unlike sub-requests, internal redirects are fully

Re: Share data between apache modules

2015-05-10 Thread Eugene Teslenko
mod_a handler function returns declined both times it's being called. Here is the source of mod's = mod_a.c = module AP_MODULE_DECLARE_DATA mod_a; static int handler(request_rec *r) { // if (strcmp(r-handler, fastcgi-script)) return DECLINED; apr_table_set(r-notes, test-var,

Re: Share data between apache modules

2015-05-10 Thread Eugene Teslenko
Thanks for your replies! After adding pointers to log and disabling handler check inside mod_a, I've noted the problem. Error log has three lines for single http-request now: mod_a[49059]: test-var=test-string, r_pp=8450610a0, notes_pp=8450621a8, handler=application/x-httpd-php56

Re: Share data between apache modules

2015-05-10 Thread Yann Ylavic
What does mod_a handler return? How do you register it (ap_hook_handler() line)? On Sun, May 10, 2015 at 3:59 PM, Eugene Teslenko eugene.tesle...@gmail.com wrote: Thanks for your replies! After adding pointers to log and disabling handler check inside mod_a, I've noted the problem. Error log

Re: Share data between apache modules

2015-05-10 Thread Eugene Teslenko
It may be any handler module. FastCGI is just for example. In apache's config it's just Action + SetHandler options. Thank you very much for your replies and suggestions, it was really an internal redirect and could get an original request rec through r-prev. 2015-05-10 21:30 GMT+03:00 Yann

RE: Share data between apache modules

2015-05-09 Thread Nadir Hamid
Hi, There is a way to do this, it would involve having the request variables changed apr_table_set(rec-subprocess_env, KEY_OF_MY_DATA, data); where the second argument would be the key you intend to pass and thirdbeing its contents, you will also need to ensure APR_HOOK_MIDDLE is given to the