• Welcome to Simple Machines Community Forum. Please login or sign up.
December 03, 2021, 12:24:06 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


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

Advertisement: