I have a eruby page, which makes a new session just for fun. The code is:
cgi = CGI.new("html4")
session = CGI::Session.new(cgi, 'new_session' => true, 'prefix' => 'rubyweb')
session['username'] = "rambo"
session.close
Then the header have a meta redirection to a simple script that creates a session from an existing one:
cgi = CGI.new("html4")
session = CGI::Session.new(cgi, "new_session" => false, "prefix" => "rubyweb")
The problem is that my last session is NIL, so it's not working.
I have coockies enabled in my browser (firefox).
What's happening?
Thanks.
How about this:
cgi = CGI.new("html4")
ERuby.cgi = cgi
session = ....
....
···
On Fri, 25 Feb 2005 23:02:05 +0900 Javier Valencia <jvalencia@log01.org> wrote:
I have a eruby page, which makes a new session just for fun. The
code is:
cgi = CGI.new("html4")
session = CGI::Session.new(cgi, 'new_session' => true, 'prefix' =>
'rubyweb')
session['username'] = "rambo"
session.close
Then the header have a meta redirection to a simple script that
creates a session from an existing one:
cgi = CGI.new("html4")
session = CGI::Session.new(cgi, "new_session" => false, "prefix" =>
"rubyweb")
The problem is that my last session is NIL, so it's not working.
I have coockies enabled in my browser (firefox).
What's happening?
Thanks.
--
Ariff Abdullah
MyBSD
http://www.MyBSD.org.my (IPv6/IPv4)
http://staff.MyBSD.org.my (IPv6/IPv4)
http://tomoyo.MyBSD.org.my (IPv6/IPv4)
Nowhere, really. Funny, isn't it?
Some (ruby-talk/34469) might suggest this way:
ERuby.noheader = true
cgi = CGI.new()
session = CGI::Session.new(cgi)
print cgi.header
...
which is not so elegant (for me, it feels like committing suicide),
yet working.
···
On Sat, 26 Feb 2005 03:48:11 +0900 Javier Valencia <jvalencia@log01.org> wrote:
Ariff Abdullah wrote:
>On Fri, 25 Feb 2005 23:02:05 +0900 > >Javier Valencia <jvalencia@log01.org> wrote:
>
>
>>I have a eruby page, which makes a new session just for fun. The
>>code is:
>>
>>cgi = CGI.new("html4")
>>session = CGI::Session.new(cgi, 'new_session' => true, 'prefix' =>
>
>>'rubyweb')
>>session['username'] = "rambo"
>>session.close
>>
>>Then the header have a meta redirection to a simple script that
>>creates a session from an existing one:
>>
>>cgi = CGI.new("html4")
>>session = CGI::Session.new(cgi, "new_session" => false, "prefix"
>=> >"rubyweb")
>>
>>The problem is that my last session is NIL, so it's not working.
>>I have coockies enabled in my browser (firefox).
>>What's happening?
>>Thanks.
>>
>>
>>
>
>How about this:
>
>cgi = CGI.new("html4")
>ERuby.cgi = cgi
>session = ....
>....
>
>
Yeah, it worked, thanks.
Where did you find such info?
--
Ariff Abdullah
MyBSD
http://www.MyBSD.org.my (IPv6/IPv4)
http://staff.MyBSD.org.my (IPv6/IPv4)
http://tomoyo.MyBSD.org.my (IPv6/IPv4)