FreiChat related discussions
[Solved] Issue with registered users

Hi, I have a problem when I select the option to only have access to the chat users who have registered and logged.

When I try to access the chat, stays in a loop trying to retrieve users online. FreichatX me works fine when I put it to the guests. I am using the latest version 4.5 Beta Stable.

I was digging in the code to see if I could fix it, when I put it in debug mode, and what so far is that freixlog.log time to time I returned a pattern of lines like the following. Sometimes it gets a lot of lines "connected", sometimes few, but usually get many of them.

March 10, 2011, 2:32 pm: main.php loaded
March 10, 2011, 2:32 pm: successfully connected to database
.
..
...
....
March 10, 2011, 2:32 pm: successfully connected to database
March 10, 2011, 2:32 pm: Unable to store in session

I do not think that is a problem in Joomla or Community Builder.



I noticed the JCB driver and so far I could not understand much, but I came to getUsers function ().

You may have something wrong with the $ userid that is used in the query?

The query by itself with a valid userid someone registered works fine.

What I can do to make it work?

Hi, I have a problem when I select the option to only have access to the chat users who have registered and logged. When I try to access the chat, stays in a loop trying to retrieve users online. FreichatX me works fine when I put it to the guests. I am using the latest version 4.5 Beta Stable. I was digging in the code to see if I could fix it, when I put it in debug mode, and what so far is that freixlog.log time to time I returned a pattern of lines like the following. Sometimes it gets a lot of lines "connected", sometimes few, but usually get many of them. March 10, 2011, 2:32 pm: main.php loaded March 10, 2011, 2:32 pm: successfully connected to database . .. ... .... March 10, 2011, 2:32 pm: successfully connected to database March 10, 2011, 2:32 pm: Unable to store in session I do not think that is a problem in Joomla or Community Builder. I noticed the JCB driver and so far I could not understand much, but I came to getUsers function (). You may have something wrong with the $ userid that is used in the query? The query by itself with a valid userid someone registered works fine. What I can do to make it work?

Good you posted the output of the log
March 10, 2011, 2:32 pm: Unable to store in session

This error is given when the query is unable to retrieve records from database
i.e query is wrong .

But If the query was wrong then the above error should get repeated again and again.
Is the error getting repeated ?




After i saw this post , i again tested the JCB driver ,
It worked absolutely fine in my localhost . also the $userid seemed to
be correct.

Can you check in your database that if you have the _comprofiler table


You can try one thing but before that one more question

Are you getting the same problem in Joomla driver as well ?

You can try this in the getUsers() function add line after query echo $query
and refresh browser to get the query in simple text

Now copy paste the query in phpmyadmin and check if there is any error
By this atleast we will be confirmed if this error is due to the query.

quoting, "The query by itself with a valid userid someone registered works fine."

I didnt understand this , can you reframe it please
thanks
Good you posted the output of the log March 10, 2011, 2:32 pm: Unable to store in session This error is given when the query is unable to retrieve records from database i.e query is wrong . But If the query was wrong then the above error should get repeated again and again. Is the error getting repeated ? <hr/> After i saw this post , i again tested the JCB driver , It worked absolutely fine in my localhost . also the $userid seemed to be correct. Can you check in your database that if you have the _comprofiler table <hr/> You can try one thing but before that one more question Are you getting the same problem in Joomla driver as well ? You can try this in the getUsers() function add line after query echo $query and refresh browser to get the query in simple text Now copy paste the query in phpmyadmin and check if there is any error By this atleast we will be confirmed if this error is due to the query. quoting, "The query by itself with a valid userid someone registered works fine." I didnt understand this , can you reframe it please thanks
Necessity is the mother of all inventions!

Hi, sorry for the delay, i just arrive from work.

The "unable to store in session" is repeated again and again.

i have the _comprofiler table, (in fact the prefix needed to access this table is fine).

The problem persist even when i use the Joomla driver...

The query generated by "getUsers()" works fine...

When i wrote "The query by itself with a valid userid someone registered works fine." i ment to wrote "The query by itself using de user id of a registered user works fine."

The request to freichat.php with getmembers and getdata seems to work fine.

All i can add to this is that in the frei_session table the rows looks like this:

using the fieldnames [id | username | time | session_id | permanent_id | status | guest]

95 | Test! testing | 1299870021 | 87 | 1300212488 | 1 | 0
96 | Test! testing | 1299870023 | 87 | 1300274653 | 1 | 0
97 | Test! testing | 1299870027 | 87 | 1300047943 | 1 | 0
98 | Test! testing | 1299870029 | 87 | 1300288143 | 1 | 0

I would continue looking.

Hi, sorry for the delay, i just arrive from work. The "unable to store in session" is repeated again and again. i have the _comprofiler table, (in fact the prefix needed to access this table is fine). The problem persist even when i use the Joomla driver... The query generated by "getUsers()" works fine... When i wrote "The query by itself with a valid userid someone registered works fine." i ment to wrote "The query by itself using de user id of a registered user works fine." The request to freichat.php with getmembers and getdata seems to work fine. All i can add to this is that in the frei_session table the rows looks like this: using the fieldnames [id | username | time | session_id | permanent_id | status | guest] 95 | Test! testing | 1299870021 | 87 | 1300212488 | 1 | 0 96 | Test! testing | 1299870023 | 87 | 1300274653 | 1 | 0 97 | Test! testing | 1299870027 | 87 | 1300047943 | 1 | 0 98 | Test! testing | 1299870029 | 87 | 1300288143 | 1 | 0 I would continue looking.

from the client side i'm always sending a get of:


http://www.mySite.com/FreiChatX/server/freichat.php?freimode=getmembers&id=383e69ee2cbf9d9b7e9535e90c223c21&time=null&clrchtids[]=

petition that echoes:

{"user_array":[],"id_array":[],"islog":"userloggedin","status":1,"messages":[],"userdata":null,"count":0,"username":"","userid":null}

from the client side i'm always sending a get of: http://www.mySite.com/FreiChatX/server/freichat.php?freimode=getmembers&id=383e69ee2cbf9d9b7e9535e90c223c21&time=null&clrchtids[]= petition that echoes: {"user_array":[],"id_array":[],"islog":"userloggedin","status":1,"messages":[],"userdata":null,"count":0,"username":"","userid":null}

there are multiple entries of the same session_id (87) in the table.
Your modifications must have affected the way in which the data is inserted.

there are multiple entries of the same session_id (87) in the table. Your modifications must have affected the way in which the data is inserted.
Necessity is the mother of all inventions!

Thanks Adesh!!!

As you explained to me, i just have to change in freichat.js the request url from:

www.mySite.com/..../FreiChatX/freimode=...

to:

mySite.com/..../FreiChatX/freimode=...

and it is working now.

You rock!

Tremendous support, buddy. I really appreciate that.

Thanks Adesh!!! As you explained to me, i just have to change in freichat.js the request url from: www.mySite.com/..../FreiChatX/freimode=... to: mySite.com/..../FreiChatX/freimode=... and it is working now. You rock! Tremendous support, buddy. I really appreciate that.
90
5
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft