2005年04月26日 星期二 21:29
我没有用过mod_python。不过感觉你好象没有创建session对象。直接session.id()就可以吗? 在05-4-26,胡兴洋<hu.007 at 163.com> 写道: > python-chinese,您好! > > 哪位大侠能给个session的例子,简单就好。不知道什么原因,我的总失败。在apache里还要设置什么有关session的选项? > > 环境:freebsd5.4rc3+apache2.0.53+python2.3+mod_python2.1.4 > > 源码index.psp: > -------------------------------------- > > > <%=session.id()%> > > > -------------------------------------- > > 输出: > -------------------------------------- > Mod_python error: "PythonHandler mod_python.psp" > > Traceback (most recent call last): > > File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch > result = object(req) > > File "/usr/local/lib/python2.3/site-packages/mod_python/psp.py", line 297, in handler > p.run() > > File "/usr/local/lib/python2.3/site-packages/mod_python/psp.py", line 191, in run > session = Session.Session(req) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 389, in Session > timeout=timeout, lock=lock) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 294, in __init__ > timeout=timeout, lock=lock) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 132, in __init__ > Cookie.add_cookie(self._req, self.make_cookie()) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 160, in make_cookie > c.path = dirpath[len(docroot):] > > TypeError: unsubscriptable object > -------------------------------------- > > 致 > 礼! > > > 胡兴洋 > hu.007 at 163.com > 2005-04-26 > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
2005年04月26日 星期二 21:44
胡兴洋,您好! 在提供一条线索,重启一次后,查看httpd-error.log,有一条信息:Creating 32 session mutexes based on 150 max processes and 0 max threads. ======= 2005-04-26 21:22:56 您在来信中写道:======= >python-chinese,您好! > > 哪位大侠能给个session的例子,简单就好。不知道什么原因,我的总失败。在apache里还要设置什么有关session的选项? > >环境:freebsd5.4rc3+apache2.0.53+python2.3+mod_python2.1.4 > >源码index.psp: >-------------------------------------- > > ><%=session.id()%> > > >-------------------------------------- > >输出: >-------------------------------------- >Mod_python error: "PythonHandler mod_python.psp" > >Traceback (most recent call last): > > File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch > result = object(req) > > File "/usr/local/lib/python2.3/site-packages/mod_python/psp.py", line 297, in handler > p.run() > > File "/usr/local/lib/python2.3/site-packages/mod_python/psp.py", line 191, in run > session = Session.Session(req) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 389, in Session > timeout=timeout, lock=lock) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 294, in __init__ > timeout=timeout, lock=lock) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 132, in __init__ > Cookie.add_cookie(self._req, self.make_cookie()) > > File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 160, in make_cookie > c.path = dirpath[len(docroot):] > >TypeError: unsubscriptable object >-------------------------------------- > > 致 >礼! > > > 胡兴洋 > hu.007 at 163.com > 2005-04-26 >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese > = = = = = = = = = = = = = = = = = = = = 致 礼! 胡兴洋 hu.007 at 163.com 2005-04-26
Zeuux © 2025
京ICP备05028076号