Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-22-2008, 07:03 PM   #1
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
mod_python/PSP - Sessions not working - browser just hangs. Why?

if I make a super simple test case:

from mod_python import psp
from mod_python import Session

def index(req):
    session = Session.FileSession(req)
    if session:
        req.write("I have a session.<br>\n")
        req.write("I don't have a session.<br>\n")
    return "<html><body>hello</body></html>"
I know this doesn't return proper html, but I don't care.. I'd be happy with any output, but I'm getting nothing. The browser just hangs - I get nothing in apache's error log & the browser just sits there with "Waiting for <myserver> ..." in the status bar. It doesn't matter if I use Session.Session(req) or Session.FileSession(req) - same thing.

I've also tried setting the apache option:

PythonOption mod_python.session.session_type FileSession
in the .htaccess file, but that isn't helping at all.

Any ideas?
Old 06-25-2008, 08:24 PM   #2
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
for the record, the above is correct.

I had put the session in the wrong place at some point during testing which hoses all python sessions from there on out until apache restarts (or maybe until the phantom session expires).

so the above should work if anyone comes across this looking for answers.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_python - is there an equivalent to $_SERVER['PHP_SELF'] in mod_python? BrianK Programming 2 04-28-2008 09:46 PM
mod_python/PSP webpage not seeing style sheets. Why for? BrianK Programming 1 04-25-2008 07:06 PM
mod_python - forms not working with publisher - Connection refused BrianK Linux - Software 1 10-16-2007 02:44 PM
A Question on Browser Sessions, and Browser Windows: opioid Programming 1 09-23-2004 02:53 PM
Mozilla browser/mail sessions? KlaymenDK Linux - Software 4 03-08-2004 03:23 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration