Session not working - new session being created for each request

I stored data in ‘session’ , but the next request from the same
machine and browser is not able to access that info. cookies is turned
on in my browser.(im using IE6).

I’m using database for session storage. i noticed that a new session
is being created for each request that comes from the browser. this
should be the reason why im not able to retrieve my data, in the next
request.

But y so? why a new session is being vreated for every request from
the same browser, same machine, same domain?

may be everytime when you run the code the control flow is coming to
session initialization. try using breakpoint and check

Unni wrote:

But y so? why a new session is being vreated for every request from
the same browser, same machine, same domain?

Any chance there is a call to “reset_session” in your code? That would
do it if that is getting hit each time. Also, somewhat along a similar
line, the user authentication plugins call reset_session where needed.
If you are using one of them and calling the wrong method at the wrong
time you might be hitting that call to reset_session.

jp

Im having the same problem. Every page refresh creates a new session.
Any help would be greatly appreciated!

i tried grepping my entire project for ‘reset_session’ . i haven’t
used it anywhere.

On Nov 12, 9:13 pm, Jeff P. [email protected]

Tried tracing the code, used breakpoints. The control flow does not
touch any session initialization code.

On Nov 12, 8:36 am, Abhi M. [email protected]

i checked the cookies so many times already now :slight_smile:

Bill, cookie file is being saved in machine, i am able to view it. but
it gets updated everytime a new request is sent to the server.

Do you have cookies disabled in your browser?

-Bill

Unni wrote:

Posted viahttp://www.ruby-forum.com/.


Sincerely,

William P.

data is being lost. session is working exactly the same way as if im
sending each request from a different machine.

Is it just being updated every time, or is session data being lost?

-Bill

Ok, one last thought. What is the expires field of the cookie being set
to? Is it somehow getting set to a time in the past? Even if it’s being
set to the current time, that would cause it to expire before the next
request.

-Bill

Unni wrote:

Do you have cookies disabled in your browser?

William P.


Sincerely,

William P.