apr_global_mutex_lock() failing with permission denied

2009-03-21 Thread Elison Smith
I am using shared memory to share some data between my module instances in
Apache child processes, and apr_global_mutex_t  to achieve
mutually-exclusive reads and writes.

In a post_config_hook, I create the mutex using apr_global_mutex_create()
and then reopen it inside each child process by calling
apr_global_mutex_child_init() inside a child_init hook.

However, when I try to grab the lock inside a child, the operation fails
with a permission denied. For the lock file, I  am using /tmp/tmp which
is a file writeable by all.

Any clues?


Input filter to process POST variables (e.g. mod_form)

2009-03-21 Thread Erik Westland

I am writing an output filter that needs to record request (headers and 
POST/GET vars) and response data (status and content-length). I was planning to 
write an input filter to capture/relay the POST/GET data (via r-notes) to an 
output filter for processing.

It seems that mod_form (see: http://apache.webthing.com/mod_form/) does the 
parameter processing, but comes with the following ominous caveat:
mod_form works with GET but is largely untested under POST, and appears to 
have problems with POST and HTTP Keepalive. That will be fixed, but it's not 
currently a priority.

Q: Does anyone know if this is safe to use? Their support page lists mod_form 
as: unlikely to represent value to you.

Q: Is there another alternative to writing my own? If not, any idea what the 
keepalive issue was?

Q:  Apache processes variables in the URL (parses into r-args) during POST 
requests, but the mod_form implementation doesn't look for r-args when 
handling POST requests. Is this disallowed/discouraged in the spec or an 
oversight in the implementation?

Thanks,
Erik