Re: How to read PHP session in module

2012-03-01 Thread yokota
Thanks for the response, Joe. My private module is for authentication. I will be happy if I can read PHP session before user authentication. If a loginOK flag of an applicationA is in PHP session, the user pass throug my module. If not, the user need to be authenticated. But probably, it will b

Re: How to read PHP session in module

2012-03-01 Thread Joe Lewis
Use a php module? Seriously, you'll have to find out where the session files are kept, and read the appropriate one. Parsing may be more primitive, because you aren't using php. It's the cost of reinventing the wheel. Joe On Mar 1, 2012 6:02 PM, "yokota" wrote: > Hello, > > I want to read PHP se

How to read PHP session in module

2012-03-01 Thread yokota
Hello, I want to read PHP session in my private module. PHP session id is in PHPSESSID cookie but I want to read the contents of PHP session in my module. Please let me know if you have any suggestions. Thank you in advance. Yokota Sakuko

Re: thread ID

2012-03-01 Thread Sorin Manolache
On 03/02/12 00:21, Ben Noordhuis wrote: On Thu, Mar 1, 2012 at 17:29, wrote: Hello, I would need a memory buffer associated per worker thread (in the worker MPM) or to each process (in the prefork MPM). In order to do that, I would need a map thread<->buffer. So, I would need a sort of thread

Re: thread ID

2012-03-01 Thread Ben Noordhuis
On Thu, Mar 1, 2012 at 17:29, wrote: > Hello, > > I would need a memory buffer associated per worker thread (in the worker > MPM) or to each process (in the prefork MPM). > > In order to do that, I would need a map thread<->buffer. So, I would > need a sort of thread ID/key/handle that stays the

Re: Intercepting HTTP 301/302 redirects

2012-03-01 Thread Joe Lewis
Congrats! Welcome to the world of filters! On 03/01/2012 09:37 AM, Swaminathan Bhaskar wrote: Ahh - Finally, I was able to get it working. Thanks for the pointer. Here is the code snippet: #include #include #include #include #include #include #define MY_FILTER_NAME "myfilter" static void i

Re: Intercepting HTTP 301/302 redirects

2012-03-01 Thread Swaminathan Bhaskar
Ahh - Finally, I was able to get it working. Thanks for the pointer. Here is the code snippet: #include #include #include #include #include #include #define MY_FILTER_NAME "myfilter" static void insert_myfilter(request_rec *req) { ap_add_output_filter(MY_FILTER_NAME, NULL, req, req->

Re: Intercepting HTTP 301/302 redirects

2012-03-01 Thread Joe Lewis
On 02/29/2012 07:46 PM, Swaminathan Bhaskar wrote: Thanks for the quick response Joe. Just to make sure, here is what I did: SetOutputFilter myfilter and the code #include #include #include #include #include #define MY_FILTER_NAME "myfilter" static int my_output_filter(ap_fi