httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Townsend <martin.towns...@power-oasis.com>
Subject Re: How do I get hold of session information?
Date Mon, 25 Oct 2010 09:27:04 GMT

On 20/10/2010 13:05, Paul Donaldson wrote:
> Thanks for your reply. I've taken a look
> at http://httpd.apache.org/docs/trunk/mod/mod_session.html, but like everything
> else in the area of Apache modules, the document is terse.
>
> Is there no documentation available on Apache Modules? There are a couple of
> books on Amazon, but is there nothing on the web? All I have found are snippets
> of information, usually poorly written (for example those referenced from
> here: http://modules.apache.org/reference.php), and the "threebit" tutorial. I
> haven't been able to find anything for those new to Apache and Apache Modules.
>
> For example, the mod_session page states:
>
> Creating a session is as simple as turning the session on, and deciding where
> the session will be stored. In this example, the session will be stored on the
> browser, in a cookie called session.
> Browser based session
> Session On
> SessionCookieName session path=/
> But it doesn't say where or how to do this. I'm sure everyone in this group will
> take that sort of thing for granted, but it's infuriating for those of us coming
> to Apache Modules for this first time.
> The page also mentions the SessionEnv directive:
>
> If set to On, the SessionEnv directive causes the contents of the session to be
> written to a CGI environment variable called HTTP_SESSION.
>
> but it'd be great if there was some documentation somewhere that said where to
> set this, and how to read it from another module, assuming that this environment
> variable is in fact the only way to get hold of the session information in my
> module. It can't possibly be an environment variable in the true sense
> (getenv...) as there may be thousands of requests hitting the server.
>
>
>
> ________________________________
> From: Ben Noordhuis<info@bnoordhuis.nl>
> To: modules-dev@httpd.apache.org
> Sent: Tue, 19 October, 2010 17:46:40
> Subject: Re: How do I get hold of session information?
>
> On Tue, Oct 19, 2010 at 17:30, Paul Donaldson
> <pdonaldson_home@yahoo.co.uk>  wrote:
>> Thank you. I will take a look at mod_session. Will my module be able to check
>> if
>> mod_session is "enabled" (sorry, I don't know the Apache terminology) and, if
>> it
>> is, talk to it and ask it for what it has stored in its session?
> Yes. It exports an environment variable, see the SessionEnv directive
> for details.
>
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1136 / Virus Database: 422/3207 - Release Date: 10/19/10
>
Hi Paul,

I found this link after writing my module and wish I had found it before.

http://www.fmc-modeling.org/category/projects/apache/amp/Apache_Modeling_Project.html

It explains the HTTP servers in general, apaches web server architecture 
and how modules fit in with this.  Along with Nick Kew's Apache Modules 
book and looking through other module code you should have everything 
you need.

Hope this helps,
Martin.


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1136 / Virus Database: 422/3207 - Release Date: 10/19/10

Mime
View raw message