Sessions Problems

Hi to group!

I am new to ROR!

I am facing problems on sessions.

First I created the one session variable.

after that I created the other one.

after moving to three pages the session was destroyed automatically.

What is the reason please help me!

Thnaks and Regards,
-Kumar Varma

Is one of your pages overwriting the values? You might try:

<%= debug session %>

In your main layout to watch what is happening to the session.

~ Ben

On 4/27/06, Kumar [email protected] wrote:


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Ben R.
http://www.benr75.com

Ben R. wrote:

Is one of your pages overwriting the values? You might try:

<%= debug session %>

In your main layout to watch what is happening to the session.

~ Ben

On 4/27/06, Kumar [email protected] wrote:

Dear Sir! Please resoleve this problem

I tryed with this in the main layout

In First Page

— !ruby/object:CGI::Session
data: &id001
flash: !map:ActionController::Flash::FlashHash {}

dbman: &id002 !ruby/object:CGI::Session::PStore
hash: *id001
p: !ruby/object:PStore
abort: false
filename:
./script/…/config/…/tmp/sessions//ruby_sess.80c276a05c5f63ec
rdonly: false
table:
transaction: false
dbprot:

  • *id002
    new_session: true
    session_id: 85a794d70db26e657042b6cf5e676cbb
    write_lock: true

In Second page also same

but we are creating other session is i.e sessiuon[:username]

In third page

— !ruby/object:CGI::Session
data: &id001
:username: admin
:checking:
flash: !map:ActionController::Flash::FlashHash {}

dbman: &id002 !ruby/object:CGI::Session::PStore
hash: *id001
p: !ruby/object:PStore
abort: false
filename:
./script/…/config/…/tmp/sessions//ruby_sess.2f5da197f2fc548f
rdonly: false
table:
transaction: false
dbprot:

  • *id002
    new_session: false
    session_id: 62971ba072a87e78cbd7f0ee2630ab79
    write_lock: true

Thanks and Regards,

Kumar


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Ben R.
http://www.benr75.com

Kumar wrote:

On 4/27/06, Kumar [email protected] wrote:
— !ruby/object:CGI::Session
table:
transaction: false
dbprot:

  • *id002
    new_session: true
    session_id: 85a794d70db26e657042b6cf5e676cbb

— !ruby/object:CGI::Session
./script/…/config/…/tmp/sessions//ruby_sess.2f5da197f2fc548f


I am having the same problem. I figured out it is due to having
multiple rails apps on the same hostname mybox.mydomain.com. Each Rails
app is overwriting the session variable of the other Rails app. Here is
the solution.

http://wiki.rubyonrails.com/rails/pages/HowtoChangeSessionOptions

I am having the same problem. I figured out it is due to having
multiple rails apps on the same hostname mybox.mydomain.com. Each Rails
app is overwriting the session variable of the other Rails app. Here is
the solution.

Peak Obsession

I have the same problem but i’m working on localhost and i have only one
started application. I don’t know why after visiting some pages,
sessions values are destroyed.

Help please!