I installed Chat Room on Drupal 5.2, MySQL 5, PHP 5.2. Everything can be set up just fine. But when actually chatting, a user will not see any other peoples' posts until the user in question posts, at which point everything updates instantly and then ceases to operate until the user posts again. This is true for every user, including those with the "administer chat" permission enabled.
To be a little clearer: say User A joins a chat. User A won't see anything in the chat even though User B has posted in it. User A posts in the chat and can now see all of user B's posts in the chat. But User B posts again, and User A can't see User B's new post until User A makes a post of his own--and when User A does so, User B won't be able to see User A's new post until User B posts again... rinse and repeat.
Help? Thanks.
Comments
Comment #1
darren ohI 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 snapshot, which 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/.
Comment #2
icecreamyou commentedI'm not using the development snapshot, and I couldn't reproduce the problem on the 1.9 build demo site. It's entirely possible that I'm using a module that interferes with Chat Room - I have something like 30 modules in use - and that's the likely situation I guess. It's not my browser or PC because I've tested it on IE7 and Firefox 2 on 4 PCs.
While I was testing it today, there was a short time during which the window/tab title switched back and forth between the name of the Chat and the name of chatroom (I think those were the names...), but the chatting itself didn't work any better.
Any interaction with the chatroom causes it to update, including posting, kicking, banning, messaging, and going away or coming back.
When I was visiting your demo site I noticed that old posts were visible when entering a chat - I know there's an option for that (that I've enabled) but I'm also not seeing any old posts until a new one is entered. And the same problem applies to user updates. It's obviously the same root issue--either Chat Room isn't allowing or sending information until a user inputs something, or my server isn't updating until it gets pinged by a specific user.
Default settings BTW, all users have full permissions.
Sigh. I've already tried PhpFreeChat and run into all sorts of problems with missing files and such. I suppose I could try AjaxIM if I can't fix this problem in the next few days. It seems to be an issue that's unique to me. Thanks for your help so far...
Comment #3
darren ohI would recommend examining the HTTP traffic to see if your browser is sending update requests and how the site is responding. You can use FireBug for that. Contact me directly if you would like help.
Comment #4
icecreamyou commentedI haven't directly done what you suggested, but I realized the site is in Safe Mode when several other modules wouldn't work because they didn't have permission to write to directories. AjaxIM didn't work either. I fully expect Chat Room to work once I get the site out of Safe Mode.
Thanks for your help.
Comment #5
icecreamyou commentedUpdate: Turning Safe Mode off did indeed fix the issue. Thanks. I'm closing the thread.
Comment #6
wheatbix commentedI am having the same problems. Can you actually explain how this problem was fixed. I do not have access to the server, so I cannot turn of PHP safe mode. Is this how the problem is to be fixed, because if it is, then there is something seriously lacking in the developers motivation to create a module that works for everyone.
I have tried changing the cookie domain, which helped people not being kicked so often, but the chat is not updating and sometimes I will be kicked.
Thanks for any suggestions.
Comment #7
darren ohYou are as capable as anyone else of providing a fix for this problem. In fact, issue 195558 requests a volunteer to maintain the current version.
Safe mode allows a hosting provider to restrict any PHP functionality it chooses. I have no idea what your host allows.
Comment #8
wheatbix commentedI am not as capable as anyone else unfortunately.
Drupal as a website management distribution release allows people with no programming experience into the website market, and I am one of those people.
I have no idea how the chat room works, I just want to be able to install it and it to work, and contribute funds towards the people working to make this happen.
Someone please help!!!!
Comment #9
benhammond commentedI have a very similar problem; chat room works brilliantly on my local machine, but fails to asynchronously update on my hosted website.
After some investigation, it looks like there is a problem with the write-permissions on the files/tmp/drupal.chatroom.SESSxxx directory.
Drupal is able to create the directory, but is not able to write any chat.x files inside the directory.
My quick hack to fix this is to alter the code in chatroom.module._chatroom_get_cache_file()
to always use $path .= ".$type"
And this seems to work very nicely.
Comment #10
giorgoskI get the same exact problem with #9 using shared hosting
cache file is in tmp folder but has 644 permissions and I can't change permissions manually
is there anyway for the script to ensure the file permissions are always OK
Comment #11
Anonymous (not verified) commentedGiorgosk: have you moved chatroomread.php into the webroot next to index.php?
the behaviour you describe could easily be accounted for by that, because write requests go through drupal's normal menu system, whereas read requests go to chatroomread.php.
Comment #12
giorgosksorry about that @justinrandell
I did not read the README.txt at all
it works perfectly now
Comment #13
giorgoskfixed
Comment #16
Desi Raaj commentedi have the same problem, i have copied the chatroomread.php in the webroot directory, but its still not working.
any help would be appreciated. thank you
I get the following error in the log
[13-Jun-2010 14:20:05] PHP Warning: require_once(./sites/all/modules/chatroom/chatroom.cache.apc.inc) [function.require-once]: failed to open stream: No such file or directory in /home/****/public_html/chatroomread.php on line 77
[13-Jun-2010 14:20:05] PHP Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/chatroom/chatroom.cache.apc.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/****/public_html/chatroomread.php on line 77
Comment #17
Desi Raaj commentedComment #18
Desi Raaj commentedComment #19
Desi Raaj commentedhere is more information i found in the reports
page not found 06/17/2010 - 23:24 chatroom/chat/get/latest/messages
Comment #20
kimjks2003 commentedI have exactly the same problem as the original poster when it comes to the chat update.
Whenever User A posts something on the chat, other users (let's say B and C) will not be able to see the message posted by A unless they refreshed the page or posted a message of their own. I really need to make my drupal chat room updating real-time (on post, others can see it automatically without having to post message or refresh the page).
I have tried setting my php server setting's Safe Mode to off but nothing happens. It still behaves the same way.
I have also tried clearing both my browser's cache and my drupal site's cache and it still behaves the same way.
I have also tried what #9 said but I cannot seem to find the "files/tmp/drupal.chatroom.SESSxxx directory" he was talking about. I can only see chatroom.module from the chatroom module folder which i don't really what to do inside it.
Help me please? And if possible, please post concrete solution to this problem. Thanks a lot.
Comment #21
Desi Raaj commentedas for file/tmp/drupal.chatroom, you have to change your tmp directory, i think its /tmp by default. you would have to go to Site Configuration --> File System and define the new tmp directory there, in this case it would be sites/default/files/tmp
Comment #22
Anonymous (not verified) commentedi've committed some hook_requirements() improvements to make it easier to spot when a) chatroomread.php hasn't been copied to the webroot, and b) the path to the module directory isn't set correctly.
http://drupal.org/cvs?commit=389584
Comment #24
sp09 commentedI'm having the same issue as the original poster also, a user can't see new messages until they enter a message. What's the solution?