anonymousXX is changed into anonymousYY each 5 seconds

igorik - December 8, 2007 - 01:50
Project:phpfreechat
Version:6.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:arisarts
Status:active
Description

Hi

(with latest phpfreechat dev module)

when anonymouse login into chat, then it is changed into anonymouse with another number each 5 seconds.
I attached a screenshot. My hosting providet tell me that it do a huge ammount of requests on server.

thanks
Igor
http://www.somvprahe.sk

AttachmentSize
phpfreechat_anonymous.jpg67.82 KB

#1

igorik - December 8, 2007 - 01:52

Please note that all that time I was only person (me as admin in Opera and me as anonymous in IE) who was connected into this chat.

#2

Omar - December 13, 2007 - 09:40
Assigned to:Anonymous» Omar

#3

permutations - December 1, 2008 - 04:41
Version:5.x-1.x-dev» 5.x-1.2
Assigned to:Omar» permutations
Status:active» postponed (maintainer needs more info)

Please try the latest version, 1.2 (just uploaded), and tell me if it's still happening.

#4

joey santiago - February 13, 2009 - 15:15

hello,

i am using 1.2 version and it happens to me with a brand new install. This module is great, though...

#5

permutations - February 13, 2009 - 15:40

What version of Drupal are you using - 5.x or 6.x?

If you are using Drupal 5.x, download the latest phpFreeChat, which is 5.x-1.3.

The solution to the problem you describe is here:

http://drupal.org/node/363233

I'm interested to hear if this is an issue with Drupal 5.x, too. If it is, I'll add the information to install.txt. Please let me know.

#6

joey santiago - February 16, 2009 - 11:31

hello,

i use 5.x-1.3 version... the link you gave me is about 6.1.1, isn't it? anyhow, i'll look at that.

thanks!

#7

GL - February 16, 2009 - 13:19

it is an issue with Version 5.x-1.3 (phpfreechat v1.2) too, confirmed using a local linux server inside my local network and testing from linux and another windows machine (firefox + IE)
the 'Anonymousxxx changes nickname to Anonymousyyy' still appears every 2 secs on every anonymous client

setting $base_url = 'http://test.local'; didn't work

#8

imatechie - February 23, 2009 - 20:14

Just a note that it does it on the 6.9 version also, but if you take a logical approach, I think I know the cause:

The module gets it's user information from the Drupal user database, if you are not a registered user, you won't be in the database. When phpfreechat tries to look up an anonymous user in the database, there is no such user, so it gets confused and goes into a loop.

For the time being, disable permissions for anonymous users to access the chat.
Disable the chat module
Delete any nodes with a chat room created on them.
Go back to Admin Modules >Uninstall and uninstall the module
If successful, go back and re-enable the module
Go to Administer>Modules>By Module>Phpfreechat and click on phpfreechat so the files
can be re-created.
Re-create your chat nodes

All should be well and working OK until they can find a way to allow anonymous users to use the chat, personally, I prefer registered users only.

So in the meantime, if your installing for the first time, don't give permissions to anonymous.

#9

joey santiago - February 24, 2009 - 10:03

i get the point....

my idea for avoiding this problem has been modifying the code by checking whether username has "Anonymous" in it before assigning a new username...

#10

arisarts - February 24, 2009 - 12:42
Version:5.x-1.2» 6.x-1.1
Assigned to:permutations» arisarts

It is only one user on my site - me, Administrator. In phpfreechat settings Auto nick option switched to "true". But I still have that same problem, AnonymousXXX change name to AnonymousYYY.

Drupal 6.9, phpfreechat 6.1.1, lang of site - RU

#11

agrigor1 - February 28, 2009 - 14:19
Priority:normal» critical

We have to make it clear.
In drupal 6.9 the problem exist for both anonymous and registered users.
The default global administrator (the one created at drupal installation) has the same problem.
I created a new user with full administration rights and this new user has the same problem.
The module cannot read the Drupal username and thus starts giving the "Anonymous" nickname to the REGISTERED users, when the Autonick parameter is set to true. If it is set to false then the user may use any nickname no matter what is the value of the Frozen Nick.

So I come to conclude that the problematic code is on finding the Drupal username and passing this to the right parameter in phpfreechat.

There is also another consequence of the problematic code. Clicking on the user info to the right doesnt give us the profile page of the other user we clicked on. It always gives us the user page of the user who does the click although he has clicked on another user.

#12

agrigor1 - February 28, 2009 - 15:28

I am sorry for the previous post. I should have read the install.txt better.
We have to change the $base_url in settings file.
I am truly sorry for the previous post.

#13

agrigor1 - February 28, 2009 - 16:57

Alright. Now the users are being displayed with their usernames but when someone clicks on them and tries to see their profile, he gets his own profile, not the profile of the other user he clicked.

It seems there is more than just adjusting the settings.php file. This only solves the problem of having registered users reconnecting to the chat as anonymous.

I also dont see the private message option. So how can someone send private messages?

#14

strauch - April 6, 2009 - 14:25

I still have the same problem. i installed phpfreechat 1.2 and the newest drupal modul. i use drupal 6.10. I set the $base_url and i have no access for anonymous user (guests).

And the name is changing every second. What is the reason the chat don't realise my nickname?

when i deactivate the autonicknames all is ok.

#15

strauch - April 6, 2009 - 14:47

Mhh the icons in my chat don't work too. The reason ist the domains et a double www. instead of http://www.domain.com it links to http://www.www.domain.com. The BaseURL is correct. Where is the error? Maybe this is the reason why the chat can't connect my users?

#16

strauch - April 6, 2009 - 15:29

ok i'm working, i had an error in my $base_url, now it is correct and work, but the icons a gone away, but this is an other issues and another thread. thanks :-).

#17

Xartac - April 9, 2009 - 08:42

Drupal 6.10
Phpfreechat module 6.x-1.1
Phpfreechat v.2

I was having this problem. Logged in users were assigned the name Anonymous[rand number] and reassigned every few seconds. After I shut off auto nick, I noticed that the link to a chat user's Drupal profile was incorrect. My site's at "beta.domain.local" and the link was going to "www.beta.domain.local", so I thought that might be part of the problem.

Made the following change to line 50 of handler.php:

Changed: $base_url = $base_root . '://www.'. preg_replace('/[^a-z0-9-:._]/i', '', $_SERVER['HTTP_HOST']);

To: $base_url = $base_root . '://'. preg_replace('/[^a-z0-9-:._]/i', '', $_SERVER['HTTP_HOST']);

Looks like everything's working now, but I'm still testing. With auto nick enabled, users are logging in fine and not being reassigned. Profile link also correct now.

#18

permutations - April 9, 2009 - 14:14

Xartax - good catch on the www! I wrote that line, and couldn't figure out for the life of me why $base_url still had to be defined manually to avoid this problem. Please post again after you're done with your further testing and say if this definitely solved your problem.

#19

HS - April 9, 2009 - 22:29

+1

#20

Giuseppe - April 30, 2009 - 12:04

drupal 6.10, pfc 6.x-1.1

After fixing the $base_url part, I have the same problem only if I set FrozenNick to true (my preferred setting).
When I set FrozenNick to false, allowing users to change their nick, the Anonymous numbers doesn't change and remains fixed to the first assigned.

#21

nadam - July 8, 2009 - 17:40
Status:postponed (maintainer needs more info)» active

I can confirm that removing "www." (as Xartac suggested) solves this problem.

#22

jleroi - September 21, 2009 - 20:23

Yes it works.

 
 

Drupal is a registered trademark of Dries Buytaert.