Stop Forum Spam

Started by SleePy, March 21, 2022, 12:11:09 AM

Previous topic - Next topic

Mooby The Golden Sock

Quote from: IVIIVI4ck3y27 on March 26, 2024, 06:12:07 PMI've run into an error with our forum upon trying to install the package. I'm getting the HTTP Error 500 as noted above.  I looked in the error log and it's noting this as the only error for today:

[26-Mar-2024 21:58:37 Africa/Abidjan] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /*****/**********/public_html/*********/forum/Sources/StopForumSpam.php on line 1023

I'm not sure on the Africa/Abidjan as the server is located in the Eastern U.S.  I blanked out the server related info and site name info. in the above shared error log comment.

I also can't run fix_packages.php either (it doesn't seem to access it when pointed at it in a browser despite it being in the root of the forum directory with the SSI and Settings.php files) so kind of stuck at the moment. It's an old forum (not active for a # of years) that I just recently updated to 2.0.19 but I'm not sure what version of PHP and MySQL we're on as it's basically been running for awhile with minimal updates.  I have ran into a lot of spammers just recently and disabled registrations. 

I'd like to revert back but obviously (and quite stupidly) I didn't back things up because... why would I? *SMDH*  Hoping I can just get it to uninstall but not sure if there's a means to?
I've got the same error.  Deleting /Sources/StopForumSpam.php and the /Sources/StopForumSpam folder will let you back into the admin area.  Can't figure out how to get the mod to work, though.

Mooby The Golden Sock

Update: Updating my PHP to the latest (8.3) fixed the problem.

Kindred

No version of smf currently supports php 8.3
Сл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."

SleePy

To be clear, SMF 2.1 doesn't officially support PHP 8.3, yet.  However, I currently don't know of any major issues with 8.3. We recommend at least 8.0.  8.1 and 8.2 are supported.  As PHP has stopped support for 8.0, you are welcome to use 8.1 or 8.2.  I don't know of any security issue in 8.0 since they stopped supporting it that would be of concern for SMF.  Maybe that will change someday and maybe that affects other software on your site.  This mod is using PHP code that requires 8.0.  Thus this mod requires PHP 8.0.  I tagged the mod on the site to show it needs 8.0.

Also this only covers 2.1.  2.0 and 3.0 both have separate supported versions.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

szinski

Just started using this new version since I upgraded to SMF 2.1.4.

Here are some of my observations using this newer version.

1. Selecting entries in the SMF log and then clicking "Delete selected" doesn't do anything.

2. When a spammer is blocked, they see "Your request was denied as your email, username and/or IP address is listed in the Stop Forum Spam database". This is too much information IMHO as the spammer now knows where to look to bypass the check. I changed my language to simply state that "your email, username and/or IP has been flagged as being that of a potential spammer". Now the spammer has no idea what was used to trigger the detection.

Overall, I really like the plugin, thanks!

SleePy

I can't reproduce the first issue, the log function does however prevent deleting logs that are less than 24 hours old.

I realize it may provide lots of information to a spammer, but if they are in the database and a legit user, it can help them request removal with no action on your part.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

landyvlad

I uninstalled the mod in order to install an update.

Got a 500 error.
Server side
Quote[11-Aug-2024 00:27:15 Australia/Brisbane] PHP Parse error:  syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST) in /home2/gsxowner/public_html/forum/Sources/StopForumSpam.php on line 16

Perhaps someone can explain this to me?


I was on PHP 7.x and upgraded to 8.0 "server busy" error.
Upgraded to 8.1 - can get back into forum.

BUT my admin password doesn't seem to work - unsure if related.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

landyvlad

Please ignore my previous post (that's sorted)

Now trying to install v 1.5.5

errors:

2.   Extract File   ./Sources/StopForumSpam.php   
3.   Extract Tree   ./Sources/StopForumSpam   File not found
4.   Extract File   ./Themes/default/StopForumSpam.template.php   
5.   Extract File   ./Themes/default/languages/StopForumSpam.english.php   File not found
6.   Extract File   ./Themes/default/languages/StopForumSpam.finnish.php   File not found

How to proceed?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

SleePy

Are you uninstalling or upgrading?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Sudhakar Arjunan

Quote from: Mooby The Golden Sock on June 21, 2024, 10:34:59 AM
Quote from: IVIIVI4ck3y27 on March 26, 2024, 06:12:07 PMI've run into an error with our forum upon trying to install the package. I'm getting the HTTP Error 500 as noted above.  I looked in the error log and it's noting this as the only error for today:

[26-Mar-2024 21:58:37] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /*****/**********/public_html/*********/forum/Sources/StopForumSpam.php on line 1023
Update: Updating my PHP to the latest (8.3) fixed the problem.

Yes today I have tried updating the mod after 6 months, and found the forum crashed with blank page.
Without stressing out, checked the error log via cpanel file manager and found same error as you received, so I have seen your solution that on upgrading php version from 7.4 to 8.3 completely via cpanel - php version changer and also deleted cache folder having all old cache files had cleared.

Then the forum loaded with php 8.3, installed mod in a second without any issues.
Settings of stop forum spam is done with the api key as planned by @SleePy

The mod worked like wow, stopped almost 4 blocks in less than a minutes.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Sudhakar Arjunan

Quote from: Sudhakar Arjunan on February 10, 2024, 06:07:15 PMYes once installed on my fresh upgraded smf 2.1.4 the install page blanks out and completely cashes my Forum.

The mod worked like wow, stopped almost 4 blocks in less than a minutes.
Waited for this mod for last 7 months after upgrading smf to 2.1.4
Thank you smf community and mod developer @SleePy
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Rhindeer

Hi there, are there instructions on how to manually uninstall this mod?

I am running 2.0.4 and PHP 7.4, and unfortunately I was an idiot and installed it without seeing that it uses 8. (I have it on another forum and installed it I believe last year, aaaand since I worked then I was big dumb and didn't check.)

So my forum won't work, and I don't have a backup. x_x Help?

Diego Andrés

SMF 2.0.4 doesn't even support PHP 7 so that could also be your issue.

SMF Tricks - Free & Premium Responsive Themes for SMF.

SleePy

You can uninstall the mod by removing the various hooks it calls.  your smf_settings table has various integration_* variables with values mentioning calls to the mod.  Removing those will remove the hooks.  You can also use repair_settings.php which has a link to remove the hooks.

You want to upgrade that forum asap due to the security issues present in previous versions of SMF.  Your admin center should have a prompt to download those and it can walk you through patching.  As mentioned since SMF 2.0.4 doesn't support PHP 7, you may have trouble with this.  We have a tool showing the manual edits you must make to upgrade to each version.  This will be tedious as there were many changes to 2.0 to add support for newer PHP versions. https://custom.simplemachines.org/index.php?action=patches

If you have no other mods/code changes installed, you could just upload the large upgrade file for 2.0, but it removes all changes.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Kindred

The poster is actually on 2.1.4
Сл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."

SleePy

Ahh well, that can also be fixed by the method to disable hooks. Or if the host supports it, enable a newer version of PHP.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

live627

Now I'm annoed enough that I sent in a pull request to address this issue.

SleePy

Thanks, I really should have done that a while ago.  Who knew so many people are still running PHP below 8.0.  I released 1.5.6, which just adds your message.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

JWJ

Following a series of troubled upgrades, downgrades, upgrades from 2.0.19 to 2.1.4, as advised in another thread I finally did a 'clean files' install of 2.1.4. It wasn't without it's issues but I eventually succeeded in establishing a clean, error free, install. Once satisfied everything was working I installed the Stop Forum Spam mod. This seems to be working perfectly except that I am getting the following Critical error in my logs.

JSON decode error: Syntax error, malformed JSON
The error is generated in /Sources/ManageServer.php at line 1264. The error occurs as soon as I land on the SFS settings page.

I'd be very grateful for any suggestions as to how to fix this. Thank you.

JWJ

In addition to the above, whenever a potential spammer gets blocked I receive an entry in the error log. Being new to 2.1.4 I assumed this was just a way of logging bans, however, I'm now wondering if this is in fact an error that needs fixing.

Advertisement: