News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SA Chat

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

Previous topic - Next topic

kesulin

Excelent mod. It use create_function() that is obsolete now. I fix it and a minor problem with count() function. Without fix anything the mod works, excelent job.

Jailer

My error log is getting spammed with this error after trying this chat mod.

WARN

count(): Parameter must be an array or an object that implements Countable

File: /usr/local/www/nginx/sachat/Sources/Users.php
Line: 161


I'm also not able to get anything to show up in the chat window. I type, hit enter and the text disappears. Any idea what is causing this?

Also is it possible to chat with multiple people with this mod?

Jailer

A little more info in case someone needs it since I can't edit my previous post.

Error in the browser console when trying to start a chat:
index.php?action=head:5 GET https://mlcnfriends.com/sachat/index.php?theme=default&cid=49&msg=test&_=1562446613152 500

Error from my server log when trying to start a chat:
Stack trace:
#0 /usr/local/www/nginx/Sources/Subs-Db-mysql.php(1171): SMF_DB_MySQLi->error('\n\t\t\tINSERT INTO...', Object(mysqli))
#1 /usr/local/www/nginx/Sources/Subs-Db-mysql.php(1487): SMF_DB_MySQLi->query('', '\n\t\t\tINSERT INTO...', Array, Object(mysqli))
#2 /usr/local/www/nginx/sachat/Sources/Chat.php(83): SMF_DB_MySQLi->insert('', 'mlcnf_2sichat', Array, Array, Array)
#3 /usr/local/www/nginx/sachat/index.php(115): savemsg()
#4 {main}
  thrown in /usr/local/www/nginx/Sources/Subs-Db-mysql.php on line 1408
PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function allowedTo() in /usr/local/www/nginx/Sources/Subs-Db-mysql.php:1408
Stack trace:
#0 /usr/local/www/nginx/Sources/Subs-Db-mysql.php(1171): SMF_DB_MySQLi->error('\n\t\t\tINSERT INTO...', Object(mysqli))
#1 /usr/local/www/nginx/Sources/Subs-Db-mysql.php(1487): SMF_DB_MySQLi->query('', '\n\t\t\tINSERT INTO...', Array, Object(mysqli))
#2 /usr/local/www/nginx/sachat/Sources/Errors.php(65): SMF_DB_MySQLi->insert('', '\n\t\t\t\t\t  mlcnf_2...', Array, Array, Array)
#3 /usr/local/www/nginx/sachat/Sources/Errors.php(51): logError('/usr/local/www/...', 1408, 'Uncaught Error:...', 'FATAL')
#4 [internal function]: shutdownHandler()
#5 {main}
  thrown in /usr/local/www/nginx/Sources/Subs-Db-mysql.php on line 1408" while reading response header from upstream, client: 67.209.241.26, server: mlcnfriends.com, request: "GET /sachat/index.php?theme=default&cid=49&msg=test&_=1562446679926 HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "mlcnfriends.com", referrer: "https://mlcnfriends.com/index.php?action=profile;u=2;area=theme"
2019/07/06 16:58:43 [warn] 4267#101791: *62031 an upstream response is buffered to a temporary file /var/tmp/nginx/fastcgi_temp/5/11/0000000115 while reading upstream, client: 67.209.241.26, server: mlcnfriends.com, request: "GET /sachat/index.php?action=head HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "mlcnfriends.com", referrer: "https://mlcnfriends.com/index.php?action=admin"


SethStudent

I just did a trial run of updating to 2.1RC2. Mods were turned off in the test site, which is fine. I deleted all Mods, the Package Manager says "No packages yet"  but SA Chat is still showing up as a dropdown in the Admin menu (Main—Configuration—SA Chat—Forum—Members—Maintenance).

I deleted the tables in the db containing smf_2sichat, but it's not going away. Any idea of what I can do to get rid of it completely?

Kindred

you have to uninstall the mod(s). Deleting them does nothing.
Replacing SMF files only disabled the mods which use code edits.

Mod which use hooks need to be uninstalled....
or use the remove_hooks script (but that removes all hooks)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SethStudent

Quote from: Kindred on July 19, 2019, 01:19:32 PM
you have to uninstall the mod(s). Deleting them does nothing.

Thanks for the quick reply! I thought all of my mods were uninstalled in the Package Manager after the update since the options were Delete—List Files—Install Mod. Is it even possible to delete a Mod thru the Pkg Mgr without uninstalling it first? I just deleted them all because I only had a few and most are now standards included with 2.1 (partial quotes, drafts, mentions, etc.)

I don't know a thing about the remove_hooks script, I'm not that technical (better at following instructions). Now I'm thinking when the time comes to update to 2.1 for "real" I should first disable and remove all mods, except for maybe the patches that brought me up to 2.0.15.

Arantor

QuoteIs it even possible to delete a Mod thru the Pkg Mgr without uninstalling it first? I just deleted them all because I only had a few and most are now standards included with 2.1 (partial quotes, drafts, mentions, etc.)

Yes, and it will leave it installed if you do so. This is useful if you have an old forum that's had all the patches (e.g. started out at 2.0.0 and upgraded to 2.0.15) where you can delete the patches and tidy up the package manager without worrying about uninstalling things.

Best suggestion: reupload the SA Chat mod, it should then give you the uninstall option.

SethStudent

Re-uploaded SA Chat, things looked fine until I clicked "Install Now". Got this:

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'to,from,msg,sent,inactive,rd,isrd)
SELECT id,to,from,msg,sent,inactive,rd,isr' at line 1
File: /home/myname/public_html/speakingofseth_2.1/Packages/temp/db.php
Line: 172

Line 172 in that file is:       array(), 'update');

I'll just note this for when I update my production site, it's really not urgent that I fix it in this test site and I'm just trying to get a feel for what's involved so I can avoid unnecessary problems.

There were a couple of odd things that happened during the update process. Not knowing whether they are bugs, I'll continue to post them here. Unless there's a list somewhere of unresolved bugs that I can look over.

Arantor

Uh... I said to upload it, just so the file would be there and then you could hit the uninstall button, not to actually install it.

But in theory you should just be able to go back to the package manager to uninstall it and have it clear things up for you.

SethStudent

#1809
I wasn't able to install it anyway, so I deleted it.

Uploading SA Chat gave me these options: Delete — List Files — Install Mod. After deleting, Browse Packages says "No packages yet." But SA Chat remains in the Admin Center as a dropdown. Clicking any link in the dropdown results in "An error has occurred, Unable to load the 'main' template."

As a "PS" settings for another mod that I deleted after updating, Simple Audio Video Embedder, is gone, so at least that worked correctly.

Kindred

As I said.... any mod that has left hooks will not fully uninstall until you remove those hooks.

with the condition your system is currently in, I expect that you will see other errors scattered around from other mods that were hooked.

Seriously, use the remove hooks script and remove the hooks.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SethStudent

Quote from: Kindred on July 19, 2019, 07:15:13 PM
Seriously, use the remove hooks script and remove the hooks.

Sorry,  from your earlier post about it sounded like it would affect more than just mods. 

A little searching told me it's part of repair_settings.php, which I ran and it fixed the problem.

Thank you so much, you're off the hook on this one!  :)

aegersz

#1812
for some reason, my dev/test system has lost chat.

the error from my browser dev tools Console error says {"STATUS":"NO ACCESS"} for index.php

... but it's identical to my live system and i just cannot work this out after many hours ~ no problems with file access etc. A reinstall doesn't help. SA Chat simply doesn't start at all.

PLEASE can anyone tell me why i would be getting this error and/or what it means.
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

kesulin

#1813
I everyone. This mod is not compatible with 2.0.17.

the error is:
{"STATUS":"AUTH FAILED"}

I read about cookies changes in 2.0.16 and test about it with the mod. There are the bug to fix.

This is the function:
function initCookies() {
global $cookiename;

if (isset($_COOKIE[$cookiename]) && preg_match('~^a:[34]:\{i:0;(i:\d{1,6}|s:[1-8]:"\d{1,8}");i:1;s:(0|40):"([a-fA-F0-9]{40})?";i:2;[id]:\d{1,14};(i:3;i:\d;)?\}$~i', $_COOKIE[$cookiename]) == 1) {
list ($member_id, $password) = @unserialize($_COOKIE[$cookiename]);
$member_id = !empty($member_id) && strlen($password) > 0 ? (int) $member_id : 0;

return array($member_id, $password);
} elseif (isset($_COOKIE[$cookiename])) {
list ($member_id, $password) = @unserialize(stripslashes($_COOKIE[$cookiename]));
$member_id = !empty($member_id) && strlen($password) > 0 ? (int) $member_id : 0;

return array($member_id, $password);
}
}


Some knows how to fix the cookies for 2.0.16?

kesulin

I wrote a post by i can't see it. Why?

aegersz

Quote from: aegersz on September 04, 2019, 06:21:52 PM
for some reason, my dev/test system has lost chat.

the error from my browser dev tools Console error says {"STATUS":"NO ACCESS"} for index.php

... but it's identical to my live system and i just cannot work this out after many hours ~ no problems with file access etc. A reinstall doesn't help. SA Chat simply doesn't start at all.

PLEASE can anyone tell me why i would be getting this error and/or what it means.

Fixed it as .htaccess had been modified by Pretty URLs.
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

Staying at 2.0.15 as 2.0.16 loses the Chat Bar.

If anybody knows why (I assume it's something like the guy above me mentioned but I didn't see that error.

Any input would be welcome.
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

kesulin

Quote from: aegersz on February 11, 2020, 02:35:00 AM
Staying at 2.0.15 as 2.0.16 loses the Chat Bar.

If anybody knows why (I assume it's something like the guy above me mentioned but I didn't see that error.

Any input would be welcome.
I ask about it in spanish forum and linked me this function:
https://support.simplemachines.org/function_db/index.php?action=view_function;id=246

I try use it but can't make work it.

aegersz

Cleared cookies, changed the cookies' name, ran all maint. uninstalled + reinstalled it, logged off/on but all failed to give me a chat bar and I get the same

STATUS: "AUTH FAILED" twice in index.php (as above)
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

I also tried this but to no avail:

https://www.simplemachines.org/community/index.php?topic=570989.msg4041539#msg4041539

(Line 326 in .Sources/ManageServer.php also)
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: