Login     Sign up
Chat: "Undefined" Problem is BACK
Monti (@monti)
Join date: Oct 21st 2010
Community posts: 14
View Profile
Send Message

Hello Vincent! The problem with the chatroom with users showing up as "Undefined" is back. Made no change to the app. Can you fix? or anyone else? Thanks!

172 months ago
putribetha (@putribetha)
Join date: Sep 17th 2010
Community posts: 34
View Profile
Send Message

Can you fix? or anyone else? Thanks!

172 months ago
Monti (@monti)
Join date: Oct 21st 2010
Community posts: 14
View Profile
Send Message

Someone else (Kevin) found the solution on this website: [url]http://anantgarg.com/2009/05/13/gmail-facebook-style-jquery-chat/[/url]

Chat now works flawlessly so far for me. Basically change the lines below in chat.php :

$dbh = mysql_connect(DBPATH,DBUSER,DBPASS);
mysql_selectdb(DBNAME,$dbh);

to

@$dbh = mysql_connect(DBPATH,DBUSER,DBPASS);
@mysql_selectdb(DBNAME,$dbh);

Kevin says that ... "My MySQL was outputting some additional information which can be disregarded with the “@” symbol, therefor the json actually passes the correct username to the script.

Hope it helps!"

Thank Kevin, not me, :)

172 months ago
putribetha (@putribetha)
Join date: Sep 17th 2010
Community posts: 34
View Profile
Send Message

tq for fix this error

172 months ago
Gil (@doyzki)
Join date: Nov 27th 2010
Community posts: 19
View Profile
Send Message

[quote=monti]:

$dbh = mysql_connect(DBPATH,DBUSER,DBPASS);
mysql_selectdb(DBNAME,$dbh);

to

@$dbh = mysql_connect(DBPATH,DBUSER,DBPASS);
@mysql_selectdb(DBNAME,$dbh);
[/quote]

I did change the $ to @ and still I am getting an undefined user from the chat bar

172 months ago
Gil (@doyzki)
Join date: Nov 27th 2010
Community posts: 19
View Profile
Send Message

i think i found the problem, i tried deleting the cache and cookies, and re uploaded the chatbar to the modules, refreshed everything and its working fine now.. :) I tested it using 2 different browsers and accounts, all is good. hope i dont need to do this every now and then..

172 months ago
Madushka Dissanayaka (@olee)
Join date: Dec 10th 2010
Community posts: 31
View Profile
Send Message

Kevin says that ... "My MySQL was outputting some additional information which can be disregarded with the “@” symbol, therefor the json actually passes the correct username to the script.

I cant understand this ?

172 months ago
Madushka Dissanayaka (@olee)
Join date: Dec 10th 2010
Community posts: 31
View Profile
Send Message

[quote=monti]Someone else (Kevin) found the solution on this website: [url]http://anantgarg.com/2009/05/13/gmail-facebook-style-jquery-chat/[/url]

Chat now works flawlessly so far for me. Basically change the lines below in chat.php :

$dbh = mysql_connect(DBPATH,DBUSER,DBPASS);
mysql_selectdb(DBNAME,$dbh);

to

@$dbh = mysql_connect(DBPATH,DBUSER,DBPASS);
@mysql_selectdb(DBNAME,$dbh);

Kevin says that ... "My MySQL was outputting some additional information which can be disregarded with the “@” symbol, therefor the json actually passes the correct username to the script.

Hope it helps!"

Thank Kevin, not me, :) [/quote]

But this not working. Please as soon as tell how to fix it..

172 months ago