Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Apache mod_python and Sessions

Reply
Thread Tools

Apache mod_python and Sessions

 
 
Markus Schaber
Guest
Posts: n/a
 
      07-04-2003
Hi,

Does anybody know a module that works with Apache 1.3 mod_python and provides session tracking?

I tried pso, but this didn't work as it should. Running in mod_python gives me one session per server process, and the session data is not rewritten to disk. Explicitly calling session.save() (as stated in the doc) fails with the error message that a dictionary doesn't have the "save" attribute. Calling it as CGI sputs the log files with error messages about missing permissions.

The apache-provided mod_session seems to miss python bindings.

I tried to google, but only found perl modules (except the pso package that doesn't work.)


Does anybody know a working solution?

Thanks,
Markus
 
Reply With Quote
 
 
 
 
Dale Strickland-Clak
Guest
Posts: n/a
 
      07-04-2003
Markus Schaber pushed the bounds of literature with:

> Hi,
>
> Does anybody know a module that works with Apache 1.3 mod_python and
> provides session tracking?
>
><Snip>
> Thanks,
> Markus
>


This is pretty easy to do by hand using MD5 and a cookie.

--
Dale Strickland-Clark
Riverhall Systems Ltd, www.riverhall.co.uk
 
Reply With Quote
 
 
 
 
Van Gale
Guest
Posts: n/a
 
      07-04-2003
Markus Schaber wrote:
> Hi,
>
> Does anybody know a module that works with Apache 1.3 mod_python and provides session tracking?


Most of the python web programming frameworks have session handling.
Here are a few:

Quixote http://www.mems-exchange.org/software/quixote/doc/
Albatross http://www.object-craft.com.au/projects/albatross/
Webware http://webware.sourceforge.net/
Jonpy http://jonpy.sf.net
Spyce http://spyce.sf.net
JOTweb http://jotweb.tummy.com/

More information can be found at:

http://www.python.org/cgi-bin/moinmoin/WebProgramming
http://colorstudy.com/docs/shootout.html

Here's an example of a module that does its own session handling using
MySQL for storage:

http://cvsview.tldp.org/index.cgi/LD...viewcvs-markup

Van Gale

 
Reply With Quote
 
Ng Pheng Siong
Guest
Posts: n/a
 
      07-05-2003
According to Dale Strickland-Clak <(E-Mail Removed)>:
> Markus Schaber pushed the bounds of literature with:
> > Does anybody know a module that works with Apache 1.3 mod_python and
> > provides session tracking?

>
> This is pretty easy to do by hand using MD5 and a cookie.


Throw in a secret and get HMAC-MD5.

See AuthCookies in M2Crypto, http://www.post1.com/home/ngps/m2


--
Ng Pheng Siong <(E-Mail Removed)>

http://firewall.rulemaker.net -+- Manage Your Firewall Rulebase Changes
http://www.post1.com/home/ngps -+- Open Source Python Crypto & SSL
 
Reply With Quote
 
Markus Schaber
Guest
Posts: n/a
 
      07-07-2003
Hi,

On Fri, 4 Jul 2003 13:16:17 +0200
Markus Schaber <(E-Mail Removed)> wrote:

> Does anybody know a module that works with Apache 1.3 mod_python and
> provides session tracking?


Thanks for all that answered, I now found the nice debian package
python_weblib that does what I need (Additionally, my boss suggested
that we should not use mod_python but CGI instead.)

I just was too stupid by including "apache" in all my search requests on google and apt-cache - this filtered out lots of useful answers...

Thanks,
Markus
 
Reply With Quote
 
Irmen de Jong
Guest
Posts: n/a
 
      07-07-2003
Markus Schaber wrote:
> python_weblib that does what I need (Additionally, my boss suggested
> that we should not use mod_python but CGI instead.)


What!? Why!?
Any sane explanation why you should go with slow, outdated CGI scripts
instead of the nice, fast web server integration of mod_python?

--Irmen

 
Reply With Quote
 
Markus Schaber
Guest
Posts: n/a
 
      07-08-2003
Hello,

On Mon, 07 Jul 2003 19:50:11 +0200
Irmen de Jong <(E-Mail Removed)> wrote:

> Markus Schaber wrote:
> > python_weblib that does what I need (Additionally, my boss suggested
> > that we should not use mod_python but CGI instead.)

>
> What!? Why!?
> Any sane explanation why you should go with slow, outdated CGI scripts
> instead of the nice, fast web server integration of mod_python?


The script will have a very low usage (maybe about ten sessions a month). And it spends lots of time doing ldap database queries, so the starting overhead doesn't hurt so much.

Additionally, the webserver currently doesn't have mod_python installed, and there is the fear that every additional module has disadvantages (bigger startup/fork time, potential bugs, memory footprint).

I hope that these two argumens are "sane" in your world, at least they are sane enough for my boss.

Greets,
Markus

 
Reply With Quote
 
Irmen de Jong
Guest
Posts: n/a
 
      07-08-2003
Markus Schaber wrote:

> The script will have a very low usage (maybe about ten sessions a month).
> And it spends lots of time doing ldap database queries, so the starting
> overhead doesn't hurt so much.


This clears it all up. No further comments

--Irmen

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod_python, jsonrpc and sessions p3dda.adam@googlemail.com Python 1 01-14-2009 09:19 PM
Mod_python, jsonrpc and sessions p3dda.adam@googlemail.com Python 0 01-14-2009 04:47 PM
mod_python.so is garbled mod_python.so is garbled blbmdsmith Python 1 12-14-2006 12:15 AM
Help required with mod_python and apache virtual hosts andy Python 3 10-02-2004 12:02 AM
Problems with setting up mod_python and Apache John Dean Python 6 09-11-2003 07:02 PM



Advertisments