I'm having a problem getting web.py's OpenID working with mod_wsgi. If
I run web.py's webser directly, it works, so I'm guessing it's not a
problem with my code but how apache/mod_wsgi stores files.  When I run
the web.py server directly, the openid library will create
a .openid_secret_key file.  If this file doesn't exist or gets deleted
by the next request, everyone is "logged out" and the file gets
recreated.  I can't confirm this is the problem, but I was wondering
if anyone had any reason why storing an encryption store as a file
would work with web.py but not with mod_wsgi.  Running the code, the
key file isn't being created in my cgi-bin.  Where would file reads/
writes go to?

Here's an example I pulled from 
http://log.liminastudio.com/programming/howto-use-openid-with-web-py.
It works when I run this locally, but doesn't using mod_wsgi.  The
only difference I can imagine is this file write.  Can anyone get this
example to run correctly with mod_wsgi?

import web, web.webopenid

urls = (
    r'/openid', 'web.webopenid.host',
    r'/', 'Index'
)

app = web.application(urls, globals())

class Index:
    def GET(self):
        body = '''
        <html><head><title>Web.py OpenID Test</title></head>
        <body>
            %s
        </body>
        </html>
        ''' % (web.webopenid.form('/openid'))

        return body

if __name__ == "__main__": app.run()

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to