FreiChat related discussions
Fatal error in \freichat\server\drivers\Custom.php

Hi FreiChat is a nice chat app every seen before, easy to integrate and providing more features.
I installed FreiChat.V.9.6 on my website, which is developed using Codeigniter Frame work(2.0).
I used Costume installation.

The Guest chat is working fine but when integrated with user table, getting the following errors.

Fatal error: Call to a member function rowCount() on a non-object in \freichat\server\drivers\base.php on line 215
if ($ban->rowCount() > 0)

if i put if (0) in this line to just skip this Then it showing the next error

Fatal error: Call to a member function fetchAll() on a non-object in \freichat\server\drivers\Custom.php on line 140
And the code on that line is $list = $this->db->query($query)->fetchAll();

Thank you

Hi FreiChat is a nice chat app every seen before, easy to integrate and providing more features. I installed FreiChat.V.9.6 on my website, which is developed using Codeigniter Frame work(2.0). I used Costume installation. The Guest chat is working fine but when integrated with user table, getting the following errors. Fatal error: Call to a member function rowCount() on a non-object in \freichat\server\drivers\base.php on line 215 if ($ban->rowCount() > 0) if i put if (0) in this line to just skip this Then it showing the next error Fatal error: Call to a member function fetchAll() on a non-object in \freichat\server\drivers\Custom.php on line 140 And the code on that line is $list = $this->db->query($query)->fetchAll(); Thank you

Before the line

$list = $this->db->query($query)->fetchAll();


Add echo $query;

Then, go to your website using chrome , and open developer tools(f12) .
Click on network tab . You should see some requests being made by freichat, click on one of them .
Now you should see a query in the response tab .

Try executing this query in phpmyadmin(or equivalent) and see if you get any errors

Before the line <code> $list = $this->db->query($query)->fetchAll(); </code> Add echo $query; Then, go to your website using chrome , and open developer tools(f12) . Click on network tab . You should see some requests being made by freichat, click on one of them . Now you should see a query in the response tab . Try executing this query in phpmyadmin(or equivalent) and see if you get any errors
Necessity is the mother of all inventions!

Thanks for your quick reply.
I added echo $query;. The issue is My user session id is a string like SM123456 like this. But the query assumed the user session id as number.
Now i'm using another auto increment number of user which is unique instead of string 'SM123456' like this.

Thanks for your quick reply. I added echo $query;. The issue is My user session id is a string like SM123456 like this. But the query assumed the user session id as number. Now i'm using another auto increment number of user which is unique instead of string 'SM123456' like this.
129
2
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