[mod_python] Session subdomains

Ruben da Silva Iglesias ruben at ozonomultimedia.com
Thu Nov 22 17:15:58 EST 2007


GREAT!!
I FOUND your modification http://issues.apache.org/jira/browse/MODPYTHON-149

         if config.has_key("mod_python.session.application_domain"):
             c.domain = config["mod_python.session.application_domain"]

I overwrite the Session.py and it works!!


Graham Dumpleton escribió:
> On 23/11/2007, Ruben da Silva Iglesias <ruben at ozonomultimedia.com> wrote:
>> I'm using Debian etch (Mod_python Version: 3.2.10-4)
>>
>> I want to use the same session for xx.mydomain.com and yy.mydomain.com
>>
>> In documentation (4.8.1) shows:
>>
>> "In order to have a session which spans across common sub domains, you
>> can specify the parent domain using the
>> mod_python.session.application_domain  option ("PythonOption
>> mod_python.session.application_domain mod_python.org" in server
>> configuration)."
>>
>> I put: "PythonOption mod_python.session.application_domain mydomain.com"
>> in virtual server apache file.
>>
>> Ok, just done that, but... it did'nt work
>> Then i read the variable with req.get_options() and it's set!
>>
>> I login in a subdomain, xx.domain.com and all works ok, i have a
>> session, but when i change to the other subdomain i'm not logged in, the
>> server sends my another session.
>>
>> (in firefox-web developer-Cookies i see the two different session
>> cookies established, one for each subdomain: HOST xx.mydomain.com and
>> HOST yy.mydomain.com)
>>
>> Can't version 3.2.10 do that?
>> I'm doing something wrong?
> 
> It is always a good idea to read the documentation for the version of
> mod_python you are using.
> 
> http://www.modpython.org/live/mod_python-3.2.10/doc-html/
> 
> Do that and you will find that no such feature exists for the older
> version you are using. In other words, you will need to upgrade to the
> newest version of mod_python if you want this feature.
> 
> Graham



More information about the Mod_python mailing list