Forum: Ruby on Rails Session ID always changing!

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Christoph T. (Guest)
on 2008-12-08 10:01
(Received via mailing list)
Hi there

I've got a problem.
I need to use the session.session_id for tracking the amount of actual
(not logged in) website-visitors. But the session-id is changing on
each request!

I use the default rails 2.2.2 settings..

Anyone an idea??

Thank you

sigma
William P. (Guest)
on 2008-12-08 23:17
(Received via mailing list)
This may be a stupid question, but does the client in question have
cookies disabled or does the domain change on subsequent requests? Also,
have you considered using one of the many log parsers available for
counting / tracking requests. I use awstats and love it. It will parse
most server logs and give you more information than you could ever want.

Maybe this helps,
-Bill

sigma wrote:
>
> Thank you
>
> sigma
> >
>

--
"I have a list of all the dvd's she had tooken..."
"I called him because I was mad that he was spreadin my famly business
round the trailer court..."
"She said she had no money for rent but she was makin money strippin"
"...they just completely at the point being turmoiled my life."
"...when the motor blowed up 2 months ago."
"I basically furnitured the whole house."
"I started the conversate on MySpace."
"I axed her what a lace from wig was and she axed me to come in for a
consertation..."
"He is the emotionalist man I eva seen..."
"...it literally ranned over my car. I mean, it may be a 2002 DaeWoo,
but it's ma ride."
"<judge>...and here is a picture of your private parts.</judge>
<defendant>That's when he stoled my phone.</defendant>"

- Anonymous Quotes from daytime judge shows
Frederick C. (Guest)
on 2008-12-08 23:21
(Received via mailing list)
On 8 Dec 2008, at 08:01, sigma wrote:

>
> Hi there
>
> I've got a problem.
> I need to use the session.session_id for tracking the amount of actual
> (not logged in) website-visitors. But the session-id is changing on
> each request!
>
> I use the default rails 2.2.2 settings..
>
If you're using the cookie store (the default) then this is normal:
the entire session is stored in the cookie, so session.session_id is
the entirety of that data (plus a checksum)
If you want to track people I'd store a random identifier in the
session.

Fred
This topic is locked and can not be replied to.