LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   mod_python/PSP - Sessions not working - browser just hangs. Why? (https://www.linuxquestions.org/questions/programming-9/mod_python-psp-sessions-not-working-browser-just-hangs-why-644157/)

BrianK 05-22-2008 07:03 PM

mod_python/PSP - Sessions not working - browser just hangs. Why?
 
if I make a super simple test case:

Code:

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")
    else:
        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:

Code:

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

Any ideas?

BrianK 06-25-2008 08:24 PM

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.


All times are GMT -5. The time now is 11:26 AM.