• Welcome to Simple Machines Community Forum. Please login or sign up.

SA Chat

Started by Diego Andrés, July 21, 2010, 10:36:59 PM

Previous topic - Next topic

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Diego Andrés

Thanks, will push those soonish (early next month probably), please remind me if I forget.

SMF Tricks - Free & Premium Responsive Themes for SMF.

aegersz

May 31, 2021, 08:20:58 AM #1862 Last Edit: May 31, 2021, 08:36:26 AM by aegersz
With MySQL 5.7, the mod fails and produces multiple php_error_log entries that say:

Undefined index: database_error in ./Sources/Subs-Db-mysql.php

PHP Fatal error: Call to undefined function allowedTo() in /Sources/Subs-Db-mysql.php on line 1427


Now, that function call to allowedTo relies on Security.php to be loaded (how does SMF load it?)

I had to back to MySQL 5.6 to get it working again.

Any ideas on why this would happen ? I tried every trick I had but no luck.

Much appreciated if you could help.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

@Diego Andrés,

I did it for you, see attached.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

... and here is the original version with it's patches. I keep this one around for group chats as the new version doesn't support that.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Diego Andrés

Thanks, will take a look later this week and update the repo too.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

I pushed the previous changes to a github repo
https://github.com/SMFTricks/SA-Chat

Could you let me know what files you modified on your first attachment so I can add those?

SMF Tricks - Free & Premium Responsive Themes for SMF.

aegersz

for the latest version (SAChatBar-1.0b):

package-info.xml
Changlog.txt

sachat/index.php

sachat/Sources/Subs.php

sachat/Sources/User.php
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Diego Andrés

Are those the same fixes from before? If so they are already on github then.
I can upload the updated package to the modsite, it'll just be named 1.1 Beta 1 instead

SMF Tricks - Free & Premium Responsive Themes for SMF.

aegersz

Yes, same as before. The main changes I made were for the original version. The only difference on the recent version is for the null array value - I used array() and you used [].
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

any more thoughts on my MySQL 5.7 error (mentioned earlier ?) it happens to both versions and SA Chat doesn't send or receive messages.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

June 26, 2021, 03:36:56 AM #1871 Last Edit: June 26, 2021, 03:48:00 AM by aegersz
I did some research and found a workaround. It is failing on the INSERT so I had to change my.cnf for MySQL to add:

sql_mode=NO_ENGINE_SUBSTITUTION

5.7 is far more stricter than 5.6 and you are using a 0 date/time value for the table 2sichat: isrd
column:

INSERT INTO smf209_2sichat(`to`, `from`, `msg`, `sent`, `isrd`)
                        VALUES
                                (2, 1, 'msgtext', '2021-06-26 17:26:07', 0)"


see https://www.percona.com/blog/2016/10/18/upgrading-to-mysql-5-7-beware-of-the-new-strict-mode/
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

Since I run a very sensitive forum, I need to archive the chat logs just in case I get in trouble on behalf of people
doing the wrong thing; this is my Linux batch SQL job in case anyone is interested:


mysql -u root -p xxxx -e "USE smf209; SELECT t1.sent, t1.from, t2.member_name, t1.to, t3.member_name, t1.msg FROM smf209_2sichat t1 INNER JOIN smf209_members t2 ON t1.from=t2.id_member INNER JOIN smf209_members t3 ON t1.to=t3.id_member\G;" > /tmp/chatlog

mailx -s "SA_Chat log" -r "SA_Chat" root < "/tmp/chatlog"


The output looks like this:

*************************** 10. row ***************************
       sent: 2021-06-23 05:12:07
       from: 2
member_name: Chipper
         to: 1260
member_name: hanna
        msg: welcome back !
*************************** 11. row ***************************
       sent: 2021-06-23 05:12:49
       from: 1260
member_name: hanna
         to: 2
member_name: Chipper
        msg: thx! been awhile my friend
*************************** 12. row ***************************
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

rcane

Hi,

I'm trying each version to see if I can make it work, but no success.

I cannot see the bar anywhere, and in the error log i find (replete throughout)

INFO

   Trying to access array offset on value of type null (in the sources/errors.php file.


Is there something i'm mising to make this work?

jsx

A lot of errors appear in the error log of this modification.

QuoteType of error   Error message   File/Line
   
INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


INFO

Trying to access array offset on value of type null

File: /home/xx/xx/mydomain.pl/sachat/Sources/Errors.php
Line: 42


INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


INFO

Trying to access array offset on value of type null

File: /home/xx/xx/mydomain.pl/sachat/Sources/Errors.php
Line: 42


INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


INFO

Trying to access array offset on value of type null

File: /home/xx/xx/mydomain.pl/sachat/Sources/Errors.php
Line: 42


INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


INFO

Trying to access array offset on value of type null

File: /home/xx/xx/mydomain.pl/sachat/Sources/Errors.php
Line: 42


INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


INFO

Trying to access array offset on value of type null

File: /home/xx/xx/mydomain.pl/sachat/Sources/Errors.php
Line: 42


INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93


INFO

Trying to access array offset on value of type null

File: /home/xx/xx/mydomain.pl/sachat/Sources/Errors.php
Line: 42

Diego Andrés

Try the updated source files over at https://github.com/SMFTricks/SA-Chat
Let me know if that works and I'll update the package.

SMF Tricks - Free & Premium Responsive Themes for SMF.

jsx

I downloaded this package from github and I only replaced these two files in sachat/Sources/Errors.php and Subs.php and errors still appear in the error log. There are currently 9 error pages.

QuoteType of error    Error message    File/Line
   
INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

INFO

Undefined index: permissions

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

WARN

array_diff(): Expected parameter 1 to be an array, null given

File: /home/xx/xx/mydomain.pl/sachat/Sources/Subs.php
Line: 93

jsx

@Diego Andrés

In permissions, groups have SA chat access and chat permission, but no group other than the admin can see the chat window or the chat bar.

Diego Andrés

When replacing the files or with the old files too?

SMF Tricks - Free & Premium Responsive Themes for SMF.

jsx

I uploaded the two files to the server where you made the changes, so the two old files were replaced by the two files where you made the changes on github. Still very many errors are generated.

When this feature is enabled: "Enable group permissions
Enable group permissions that you can modify in the permission manager in SMF. Note: The settings here will override permission setting"
then no group can see the chat. What exactly does this function do?



Advertisement: