Users get kicked out all the time

be9 - September 30, 2007 - 16:11
Project:Chat Room
Version:5.x-1.9
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

When a user enters the chat, he gets kicked out of it automatically (noone issues /kick command). Just tested it myself: logged under another user, entered chat -- and voila.

How is that?

#1

Darren Oh - September 30, 2007 - 18:54
Status:active» closed

The dev version is unstable. Try downloading it again tomorrow, or update with CVS.

#2

Andrzej7 - October 24, 2007 - 21:47
Status:closed» active

I've got the same issue

Drupal 5-1
Chat room 1,9
Message: You have been kicked out of Test1 for misbehaving. (on admin account and another one too).

#3

ecarvalho - November 16, 2007 - 18:17

Looking for updates to this block. I'm also getting kicked out from the room as soon as I join in. I'm accessing as the administrator of the site or a guest.

AttachmentSize
kicked shot.png 32.99 KB

#4

Darren Oh - November 19, 2007 - 19:58
Status:active» postponed (maintainer needs more info)

I have not been able to reproduce the problem. However, I have set up two demo sites, one for the official release and one for the development release, that anyone can use. Please see if you can reproduce the problem there, and report your results.

You will find links to the demo sites at http://chatroom.darren.oh.name/.

#5

Xartac - November 20, 2007 - 08:03
Version:5.x-1.x-dev» 5.x-1.9

My setup:
Drupal 5.3
Chat Room 5.x-1.9
Apache 2.2.4

I had the same problem, getting kicked out as soon as I went to the chat room. Tried the solution suggested here, and it fixed things.

I added the hardcoded $cookie_domain to my settings.php file, and everything works fine. If I remove it, it goes back to instantly kicking everyone off.

#6

Darren Oh - November 20, 2007 - 13:44

That's strange. The demo site uses an unmodified settings.php.

#7

babelfish - November 22, 2007 - 13:41

I have experienced the same problem.
I installed the chat room module with Drupal 5.3 and received the same message ("You have been kicked out...").
However, when I used the same Drupal installation with a blank database (basic table structure with no content), the chat room worked fine.
The next thing I did was to try chat room with the original database with all modules switched off and removed (except for core modules) but it didn't work again.
Could there be a conflict between chat room and some other module?

#8

Darren Oh - November 26, 2007 - 22:35

babelfish, besides turning off all other modules, log out of your site and delete your cookies. I did some troubleshooting on a site last month and found that the problem was multiple cookies being set. If session_id() returns something different from what Chat Room has stored, authentication fails and the user is kicked out.

The site administrator suspected that the multiple cookies were caused by the internationalization module's URL rewriting, but I have not investigated that, nor have I investigated how Drupal handles multiple cookies.

Since cookies are based on $base_url by default, setting $base_url or $cookie_domain in settings.php prevents the problem.

#9

torgosPizza - November 30, 2007 - 18:29

Can confirm that this is still an issue. Set $base_url in settings.php, cleared cache and cookies, reloaded the chat and I (the admin) am getting kicked out immediately.

#10

Darren Oh - November 30, 2007 - 18:47

I would be interested in looking at your chat. The problem may be easier to diagnose now.

#11

babelfish - December 4, 2007 - 22:53

Darren Oh, I had already tried all that you suggested (setting $base_url and $cookie_domain, logging out, deleting all cookies) but I still got kicked out. Interestingly, when I just logged out without deleting cookies and entered the chat as guest, it worked. Any idea?
Here's the link to the site:
http://www.tanszeknyelviskola.hu/chatrooms

#12

samyak_bhuta - June 29, 2008 - 04:23

Hi Babelfish,

I was "kicked out" at yout chat room only after posting 1 singel comment. Then I tried to replicate the it ... but I am able to post multiple messages and I am not kicked out.

Daren Oh,

First of all kudos for all this good work on chat module. I am not able run it on my site but I tested it in your demos server. It is looking really impressive. I am also getting "kicked out" from the chat topic. This is the URL to check what's wrong. http://example.org/?q=samplechatroom. I have set ....

$cookie_domain = 'www.example.org'; and
$base_url = 'http://example.org'; // NO trailing slash!

Please let me know if you want any further access. I can be reached at samyak dot bhuta at gmail dot com. Please mention the topic [ChatRoom in Drupal] in mail if possible.

Regards,

Samyak

#13

skari - January 10, 2008 - 15:52

I am experiencing the same issues.
I've upgraded to the latest drupal 5.5 release and installed the latest dev snapshot of chatroom, to no avail. I've tried the other combinations.

I've also set the $cookie_domain ad $base_url

It would be very interesting to see this in a working state

Yeah, and btw I am not even able to send messages. I.e. I get the chatroom window up with the message log and message edit box and the send button, but my messages never appear in the message log.

#14

skari - January 10, 2008 - 22:43

A new observation on this:

I just finished upgrading a 5.1 installation on a Windows XP machine to 5.5, and then installed Char Room 5.x-1.9. It seems to work flawlessly.
Then I upgraded to 5.5 a very similar 5.1 installation running on a Gentoo linux server box, installed C.R. 5.x.-1.9. and got the same irritating behavior that people are describing here.

So it seems to work on a windows box, but not on linux or Mac (my development environment).

#15

Darren Oh - January 11, 2008 - 00:34

I develop on a Mac, and the Chat Room demo site runs on Linux, so the problem is not related to the OS.

#16

skari - January 11, 2008 - 22:36

Hi again,

a little more detail here. I noticed that the generated source on my working windows installation is a bit different from my broken linux installation.

I notice especially that the source code generated by the windows machine is missing this line:
/drupal/modules/chatroom/chatroom.block.js

the javascript object settings, is also considerably longer when coming from the linux server.

Is it possible that this results from the fact that before I installed 5.x-1.9 (on the linux server), I had attempted to install the latest dev version against drupal 5.1? Then I upgraded drupal to 5.5 and tried dev again before going to 5.x-1.9?

here is a snippet from the window machine:

Drupal.extend({ settings: { "chatroom": { "chatId": "1", "lastMsgId": 0, "cacheTimestamp": 1200087799, "updateCount": 0, "updateUrl": "http://localhost/drupal/modules/chatroom/chatroomread.php", "kickUrl": "/drupal/?q=chatrooms/kicked/", "drupalBase": "C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\drupal", "baseUrl": "http://localhost/drupal", "userBase": "modules/user", "chatroomBase": "modules/chatroom", "userUrl": "/drupal/?q=user/", "chatCacheFile": "C:\\DOCUME~1\\skari\\LOCALS~1\\Temp\\php\\upload/drupal.chatroom.SESScfc90a62c81b7bfc6f292320b1d0b8ca/chat.1", "chatUpdateInterval": 1000, "idleInterval": 60000, "chatUsers": [ { "user": "admin", "uid": "1", "guestId": "1", "away": 0, "self": true } ], "userColours": [ { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true } ], "timezone": "0", "joinMessage": " has joined the chat", "leaveMessage": " has left the chat", "awayMessage": " is away", "backMessage": " is back", "basePath": "/drupal/" } } });

here is a snippet from the linux server:

Drupal.extend({ settings: { "chatroom": { "chatId": "3", "lastMsgId": 0, "cacheTimestamp": 1200089473, "updateCount": 0, "updateUrl": "http://linuxbox/drupal/modules/chatroom/chatroomread.php", "kickUrl": "/drupal/chatrooms/kicked/", "drupalBase": "/var/www/localhost/htdocs/drupal", "baseUrl": "http://linuxbox/drupal", "userBase": "modules/user", "chatroomBase": "modules/chatroom", "userUrl": "/drupal/user/", "chatCacheFile": "files/tmp/drupal.chatroom.SESS9e739d2bcd69e31d3d7dfdaf3450cf7b/chat.3", "chatUpdateInterval": 1000, "idleInterval": 60000, "chatUsers": [ { "user": "admin", "uid": "1", "guestId": "6", "away": 0, "self": true } ], "userColours": [ { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true }, { "colour": "#CC0000", "unUsed": true } ], "timezone": 0, "joinMessage": " has joined the chat", "leaveMessage": " has left the chat", "awayMessage": " is away", "backMessage": " is back", "basePath": "/drupal/", "roomBase": "/drupal/node/", "chatBase": "/drupal/chatrooms/chat/", "chatsCacheFile": "files/tmp/drupal.chatroom.SESS9e739d2bcd69e31d3d7dfdaf3450cf7b/chats", "roomsCacheFile": "files/tmp/drupal.chatroom.SESS9e739d2bcd69e31d3d7dfdaf3450cf7b/chatrooms", "blockUpdateInterval": 5000, "chatTimestamp": 1200089468, "roomTimestamp": 1200089468, "uid": 1, "usersMessage": "There are no other users on line.", "chatsMessage": "There are no active chats.", "roomsMessage": "There are no active chat rooms." } } });

Thanks,
skari

#17

skari - January 11, 2008 - 22:55

Hi again,

Ehemm... ok I resolved the issue! An elementary mistake.... :(
When I upgraded from 5.1. to 5.5, I out of old-fashioned lazyness copied my old settings.php over the new one...

When I upgraded the windows installation I did a simple edit for the db_url => no problems.

The code in the settings.php that was causing the problem was the old cookie "fixing" code:
if (isset($_SERVER['HTTP_HOST'])) {
$domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
// Per RFC 2109, cookie domains must contain at least one dot other than the
// first. For hosts such as 'localhost', we don't set a cookie domain.
if (count(explode('.', $domain)) > 2) {
ini_set('session.cookie_domain', $domain);
}
}

case closed. I guess it is the same problem on my Mac at work.

cheers,
skari

#18

skari - January 11, 2008 - 23:14

btw.

Impressive work Darren Oh

#19

softtouch - January 18, 2008 - 03:33

I do not have this old code in my settings.php (5.6), but I also get kicked out from time to time, and user too, on a FRESH install of drupal with the 1.9 version of the chat.

#20

mr.andrey - January 22, 2008 - 21:32

Same here - fresh dev install, commented out the cookie fixing code, still get kicked out.

A.

#21

mr.andrey - January 22, 2008 - 21:42

Oops, nevermind - commenting out the code fixed the kicked out problem (some confusion with settings.php).

Thanks,
Andrey.

#22

jbenjaminaz - February 8, 2008 - 02:04
Status:postponed (maintainer needs more info)» fixed

I had the same problem and traced it down to session handling. The first call to chatroomread.php establishes a new session ID that does not match what the rest of Drupal is using.

I see two session cookies on my site, after having used chat:
PHPSESSID=99a28d93f3fa2a23480a9494c4372912
SESS029b134638fd9d6ea19066202985de77=a88428d5ea8cc0414b41b21bd4503711

I can see the correct session ID in the database tables named sessions and chatroom_contact_list. As you enter the chatroom (pre-Ajax) the Drupal session ID is used. chatroom.module's method named chatroom_chat_register_user() inserts the chatroom_online_list record with the correct session ID.

Then, as soon as the JavaScript kicks in to poll chatroomread.php a new session ID is generated and used thereafter for all calls to chatroomread.php. In fact, the "SESS"+md5 session cookie shows up in my browser when I enter the individual chat room on the very first call to chatroomread.php. It is used thereafter by chatroomread.php.

The failure occurs first in chatroom/update.inc's method named chatroom_chat_is_registered_user() because it is not looking for the same session_id that was stored there by chatroom_chat_register_user().

My root Drupal folder's .htaccess file is using php_value session.auto_start 0 and my settings.php has ini_set('session.save_handler', 'user'). I believe those are default settings, or at least I don't remember changing them since installing Drupal.

Adding to my person confusion, chatroom.module's method named chatroom_bootstrap() appears to be what explicitly generates this separate session prior to calling drupal_bootstrap for the session, by a line that reads:
  session_name('SESS'+md5($session_name));

Commenting this line out of modules/chatroom/chatroomread.php fixed it perfectly for me.

#23

IceCreamYou - February 12, 2008 - 05:44
Status:fixed» postponed (maintainer needs more info)

Which file is that line in, and where? It doesn't seem to show up in any of my files. I'm having the same problem needless to say.

#24

acmfox - February 19, 2008 - 01:31

I am still having the same problem. I tried commenting out the session_name line per jbenjaminaz's post. For me, it made an intermittent, and very annoying problem, permanent. In other words, I get the problem every time. I've also tried many of the other solutions posted above. I have been able to lessen the kick message problem, but not eliminate it. I'm still having major issues with excessive join/leave messages, which I think must be related in some way. Argh! I'm pulling my hair out.

#25

scarer - February 27, 2008 - 04:41

Yes I am having all the problems described.

Is there any chat module that runs well in drupal?

#26

scarer - February 27, 2008 - 05:11

commenting out this line seemed to make it run:

session_name('SESS'. md5($session_name));

not:

session_name('SESS'+md5($session_name));

#27

Garden One - March 24, 2008 - 16:58

I am still having the same problems listed above after copying the suggested line to make sure I was commenting out the correct code

session_name('SESS'. md5($session_name));

This caused me, the admin, to get kicked out of the Chat Room. Our members really like this mod and will use it a lot, if we can find a way to stop offending them.

Any other suggestions or update coming soon?

#28

rkdesantos - April 24, 2008 - 01:03

Apparently the same as my problem: http://drupal.org/node/246256: subscribing.

#29

Steve Dondley - May 14, 2008 - 20:01

I can confirm this problem. Happened to me on another computer. It happened on the first time visiting the site as an anonymous user.

#30

Steve Dondley - May 14, 2008 - 21:57

I think this may be related to caching of pages by anonymous users. I turned it off and it seems to work.

#31

Darren Oh - May 14, 2008 - 23:24

I still can't reproduce this on our test site. Was it the settings at admin/settings/performance that you changed? What settings worked and what settings cause the problem?

#32

Steve Dondley - May 15, 2008 - 12:39

Yes, the cache settings in admin/settings/performance. I set to no caching from "normal".

#33

Marat - May 18, 2008 - 16:30

I have the same problem, I turned the caching off but still not working!

#34

rkdesantos - May 18, 2008 - 23:24

Having caching turned completely off for all users including anonymous AND making the change indicated in #22 and #26 seems to have eliminated most of my errors. However, it obviously does this at great penalty to my site performance. So the problem is still there but now I have no caching at all on the site.

#35

thomasmuirhead - June 2, 2008 - 14:09

Hi I have the same problem.

1. We have had a working chatroom for around 3 months, now all of a sudden it kicks out users (all registered users - anonymous users can't access chatrooms) seemingly at random, sometimes frequently, sometimes not so much.

2. I also seem unable to kick people out at will, nor ban people. (not sure if related)

3. The audio alerts don't work either. (not sure if related)

I've tried these fixes to no avail:

1. uncommenting the $cookie_domain in settings php and changing the base_url to:

$cookie_domain = 'www.whatnow.org.uk'; and
$base_url = 'http://www.whatnow.org.uk'; // NO trailing slash!

2. commenting the session_name('SESS'+md5($session_name)); in modules/chatroom/chatroomread.php
3. I have disabled caching and set a Minimum cache lifetime to 1 minute

Still my users are getting frustrated, some of them being kicked out 10 times in half an hour.

Darren, I'd be happy to give you access to the site if you would like to see the error in action. I can be reached at thomas at cancerbackup.org

thank you in advance for any help on this,

and thank you for the module in the first place

thomas

#36

thomasmuirhead - June 4, 2008 - 23:43

To follow on from the above post after a bit more experimenting.

I removed the 'chat online list' block and the kicking out ceased immediately.

I then removed the chatrooms and created new ones before reenabling the block.

The block then brought the site down. Restarted the server, and it happened again.

I've since removed the block again and the site is holding up so far.

Hopefully someone wiser than I will read this and go....ahhhhhhh

thanks

Thomas

#37

rkdesantos - June 5, 2008 - 15:37
Status:postponed (maintainer needs more info)» active

#38

WISEOZ - June 8, 2008 - 00:33

I have the same issues with chat rooms and have confirmed that removing the 'chat online list' block fixes the problem. My chat room has been running wonderfully now for 2 days. Feel free to see for yourself ... http://www.wiseoz.com/chatrooms/chat/3.

#39

yan - July 1, 2008 - 11:14

I had the same problem of beeing kicked out. Commenting out $base_url and the cookie domain in my settings.php solved the problem. I'm using Drupal 5.7 with Chat Room 5.x-1.9.

#40

rkdesantos - July 1, 2008 - 17:45

Hey maintainers: So is anything being done to fix this bug for good? It's now 9 months old and it obviously affects a lot of users. This thread also has substantial info on where the problem(s) lie. Just wondering...

#41

rcjohnson - July 24, 2008 - 17:50

Just noting the same problem with what appears to be a great module. I don't have access or the authority make the changes noted above for the site I'm using this, so any fix to this would be awesome.

#42

rkdesantos - September 5, 2008 - 23:03

Based on what I have read elsewhere in the issues, it appears that there is no development going on with the D5 version any longer and certainly no maintenance. I can understand that the maintainer(s) don't have the time but wouldn't it be better to say this explicitly on the module page and change the status of these bugs to "postponed" and "D6" if that is the case? Save us from checking here when nothing is going to happen.

#43

SamRose - September 15, 2008 - 15:56

Online users block and who is in chat block seems to be the culprit for me, too. I applied all changes in this thread, upgade to dev, etc, and nothing did it. Removing these blocks stopped the kicking....

#44

SamRose - September 17, 2008 - 04:29

This issue is the only thing that is causing me immediate problem using this module. Commenting out base_url not an option for me (and it should not be required for a well made drupal module)

So, I would like to push forward and see if we might be able to find the *cause* of the problem and then submit a patch to fix it.

One of the things that I noticed about the chat online list is that when *it* updates, this seems to be followed shortly after by users being kicked.

If anyone has some ideas here, please feel free to chime in.... :-)

#45

SamRose - September 17, 2008 - 04:39

after some testing, looks like having both chat online list and Chat Room: site-wide on-line list blocks active is the cultprit in my case...

chat online list alone is not kicking...

#46

rkdesantos - November 4, 2008 - 15:38

What is the status of the D5 version of this module? Any plans to address this issue further?

I did check the Chat discussion as suggested on the project page but saw nothing there to answer this.

While it is encouraging that D6 seems to be moving along as I plan on upgrading my site to D6 in 2009, it would be good to know where the issues in D5 stand until then. As I noted before, I can understand that the maintainer(s) don't have the time or resources to work on the D5 bugs but wouldn't it be better to say this explicitly on the module page and change the status of these bugs to "postponed" and "D6" if that is the case? Thanks.

#47

pgosliga - November 10, 2008 - 11:55

hey all,

i just installed the chatroom module and got the kicked out too, after reading all messages, i'm kind of confused.

anybody got the problem solved allready? and if so, anybody can give a summary to solve it?
since i got the latest version of the chat room (i think) version 1.27.2.16 2007/10/03
and am running drupal v 5-2

kind regards,
pieter

#48

SamRose - November 11, 2008 - 01:06

pgosliga,

In my case, disabling site-wide chat online list block stops the problem

#49

pgosliga - November 11, 2008 - 08:57

works, indeed. but now next thing is i don't see my messages showing up in the main window. guess that's an other problem, will browse through all the posts again for this one. thanks!

any suggestions, what that issue caused??

#50

justinrandell - November 11, 2009 - 12:40
Status:active» postponed (maintainer needs more info)

i'm not really interested in fixing 5.x issues, but i'm willing to help anyone who supplies patches.

anyone?

 
 

Drupal is a registered trademark of Dries Buytaert.