[development] sessions problem
Sheryl (Permutations Software)
sheryl at permutations.com
Wed Dec 24 06:39:44 UTC 2008
Larry Garfield wrote:
> You already posted that in an earlier message. There's no need to repeat
it only a few moments later because the thread forked.
> It sounds like phpFreeChat (that's a 3rd party system with bridge module?)
Yes. I'm a co-maintainer on the bridge module.
> is doing something with the session itself, perhaps?
It looks to me like phpFreeChat is never clearing out session data, so it
ends up saving info about the last x chats the person logged into (e.g. the
other users in the chat, the available chatrooms, etc.). Maybe some of this
is needed for current chats, but I can't see how it's needed for historical
chats. This $_SESSION data grows over time until it's enormous, which is why
saving it to the sessions table was creating problems on the server.
> Check through its code and see where it is saving what to the session.
It would be very hard for me to figure out what it's saving to $_SESSION and
why (what's necessary and what is not). It's a big, complicated program.
That's why I really liked Moishe's suggestion of just disabling all writes
to the sessions table in Drupal. And it seems to me that it should have
worked, but it didn't, so I think there is something wrong with how I
> As for "standalone program", remember that there is only one session for
the entire PHP process, and it gets saved only once. If phpFreeChat is
using the session it may be doing its own session starting and closing and
saving, or at least trying to. If so, it would not surprise me at all if
that collides with Drupal.
I see what you're saying, but there doesn't seem to be any conflict as long
as the $_SESSION variables are saved to the sessions table. But when I add
the line session_save_session(FALSE); to the top of the bridge module,
suddenly phpFreeChat doesn't work. That doesn't make any sense because
(theoretically - if I did it right) this just prevents saving the $_SESSION
variables to a table that phpFreeChat doesn't use in the first place. So I
feel sure I'm doing something wrong in how I'm turning off writes to the
sessions table - but I don't know what.
Thanks for your feedback.
More information about the development