LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 05-22-2008, 08:03 PM   #1
BrianK
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:

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?
 
Old 06-25-2008, 09:24 PM   #2
BrianK
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.
 
  


Reply


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 10:46 PM
mod_python/PSP webpage not seeing style sheets. Why for? BrianK Programming 1 04-25-2008 08:06 PM
mod_python - forms not working with publisher - Connection refused BrianK Linux - Software 1 10-16-2007 03:44 PM
A Question on Browser Sessions, and Browser Windows: opioid Programming 1 09-23-2004 03:53 PM
Mozilla browser/mail sessions? KlaymenDK Linux - Software 4 03-08-2004 04:23 PM


All times are GMT -5. The time now is 10:53 AM.

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