From: Bruno Sousa Date: 2009-08-08T03:34:11+09:00 Subject: CGI::Session just don't work I got this file to a apache/mod-ruby server and nothing is being set to "lastaccess" test.rhtml: <% require 'cgi' require 'cgi/session' cgi = CGI.new("html4") sess = CGI::Session.new( cgi, "session_key" => "a_test", "prefix" => "rubysess.") lastaccess = sess["lastaccess"].to_s sess["lastaccess"] = Time.now if cgi['bgcolor'][0] =~ /[a-z]/ sess["bgcolor"] = cgi['bgcolor'] end cgi.out{ cgi.html { cgi.body ("bgcolor" => sess["bgcolor"]){ "The background of this page" + "changes based on the 'bgcolor'" + "each user has in session." + "Last access time: #{lastaccess}" } } } %> What can be happenning? -- Posted via http://www.ruby-forum.com/.