Are cookies enabled? If not, should be. what does request look like
<dtml-var REQUEST> Is SESSION presnt? On Mon, 13 Mar 2006, Jeff Gentry wrote: > Okay ... I figure I've probably managed to really hose up my Zope instance > somehow but I can't figure out what it would be. Whenever I'm trying to > access the SESSION data, I get an AttributeError on SESSION. This used to > work for me and on another Zope instance I have it does indeed work. I > used the session test PythonScript from The Zope Book, as follows: > > secs_per_day=24*60*60 > session=context.REQUEST.SESSION > if session.has_key('last view'): > # The script has been viewed before, since the 'last view' > then=session['last view'] > now=context.ZopeTime() > session['last view']=now # reset last view to now > return 'Seconds since last view %.2f' % ((now - then) * secs_per_day) > > # The script hasn't been viewed before, since there's no 'last view' > session['last view']=context.ZopeTime() > return 'This is your first view' > > (well, I actually started with other code, but this causes the same > issue). > This works as advertised in my other instance but throws the same > AttributeError on my first instance. I'm assuming that I managed to > delete and/or edit something important without realizing it. I did some > web searches on this but didn't really turn up anything, pretty much > everything I found assumed that SESSION was working :) > > > _______________________________________________ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > -- _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )