Advertisement:

Author Topic: Stop Spammer  (Read 306220 times)

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: Stop Spammer
« Reply #1720 on: April 13, 2013, 03:28:38 AM »
It should work fine with 2.0.4, so check your host's permissions and any other mods you have installed. :)
~SugarD-x~

Offline NeonFlash

  • Newbie
  • *
  • Posts: 5
Re: Stop Spammer
« Reply #1721 on: April 13, 2013, 03:31:33 AM »
@SugarD-x: Thanks for the quick reply. What permissions and settings do I need to check?

I have only one mod installed and that is: Stop Spammer version 2.3.9

I checked this in the Admin Panel -> Package Manager -> Browse Packages

Offline NeonFlash

  • Newbie
  • *
  • Posts: 5
Re: Stop Spammer
« Reply #1722 on: April 13, 2013, 03:38:55 AM »
Do I need to check the permissions of Stopspammer.php file?

I logged into my Cpanel and in the SMF's Sources folder, the permissions of Stopspammer.php are: 640

please let me know what modifications I need to make.

is there some kind of error logging I can enable which will let me debug this further? Like what is preventing the script from connecting to the SFS database.

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: Stop Spammer
« Reply #1723 on: April 13, 2013, 03:39:06 AM »
@SugarD-x: Thanks for the quick reply. What permissions and settings do I need to check?

I have only one mod installed and that is: Stop Spammer version 2.3.9

I checked this in the Admin Panel -> Package Manager -> Browse Packages
You're welcome!

When I say your host's permissions, I mean what your hosting service allows. They may be blocking StopSpammer from connecting. I believe, if I remember correctly, it uses fsockopen() to connect. If the problem doesn't resolve itself after a day or so, I'd recommend talking to them and seeing if that is blocked. :)

As for the mods, if it's the only one you have installed, then it's not that.

Also, be careful to not double-post. Please use the edit button in the future. ;)
~SugarD-x~

Offline NeonFlash

  • Newbie
  • *
  • Posts: 5
Re: Stop Spammer
« Reply #1724 on: April 13, 2013, 03:52:55 AM »
Thanks, I will not double post.

It should not be an issue with the Hosting Provider, because this Mod was working properly for me previously on the same hosting. The only thing which has changed from before is the SMF version which was upgraded.

I checked the source code of StopSpammer.php and I think it uses the following code snippet to test the connection in checkDBSpammer() function:

Code: [Select]

$remoteXML = 'http://www.stopforumspam.com/api?' . ('127.0.0.1' != $check_ip ? ($modSettings['stopspammer_check_ip'] ? 'ip=' . $check_ip . '&' : '') : '') . ($modSettings['stopspammer_check_name'] ? 'username=' . urlencode($check_name) . '&' : '') . ($modSettings['stopspammer_check_mail'] ? 'email=' . urlencode($check_mail) : '');

// Try to download.
require_once($sourcedir . '/Subs-Package.php');
$down_ok = fetch_web_data($remoteXML);

// Test Host Connection
if ($test) return (bool)$down_ok;

// Connection Failed
if (!$down_ok)
if ($modSettings['stopspammer_faildb'])
return ('1' == $modSettings['stopspammer_faildb'] ? 0 : 8);

if $down_ok is set to 0, then it will display the faildb error.

The permissions for both, StopSpammer.php and Subs-Package.php are set to 640. Could this problem arise due to the permission settings of these two files?

Could you please confirm what should be the settings for these two?

I can try uninstalling and reinstalling the mod as well as an option.

This mod was installed around 1 week ago and the connection failure issue with the SFS database still persists.

***************************************

Edit:

I checked it further and the fetch_web_data() function called by StopSpammer.php to connect to stopforumspam.com API is defined in Subs-Package.php.

And yes, it appears that it makes use of fsockopen():

Code: [Select]
// Get the contents of a URL, irrespective of allow_url_fopen.
function fetch_web_data($url, $post_data = '', $keep_alive = false, $redirection_level = 0)
{
global $webmaster_email;
static $keep_alive_dom = null, $keep_alive_fp = null;
....
...
if (empty($fp))
{
// Open the socket on the port we want...
$fp = @fsockopen(($match[2] ? 'ssl://' : '') . $match[3], empty($match[5]) ? ($match[2] ? 443 : 80) : $match[5], $err, $err, 5);
if (!$fp)
return false;
}

***************************************************

Edit again:

I just uploaded a PHP script to my site through FTP to check the settings of PHP.ini and fsockopen() is not disabled:

Code: [Select]
disable_functions: link,symlink
only the link() and symlink() functions are disabled.

Thanks.
« Last Edit: April 13, 2013, 04:07:17 AM by NeonFlash »

Offline Kindred

  • Support Specialist
  • SMF Master
  • *
  • Posts: 31,458
  • Gender: Male
    • wagner999 on Facebook
    • @Kindred_999 on Twitter
Re: Stop Spammer
« Reply #1725 on: April 13, 2013, 07:51:14 AM »
it is not a problem with smf or with the mod...   sometimes the sfs db goes down
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support forums.  Thank you.

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: Stop Spammer
« Reply #1726 on: April 13, 2013, 09:40:16 PM »
it is not a problem with smf or with the mod...   sometimes the sfs db goes down
The database wasn't down at the time he posted.
~SugarD-x~

Offline SnowRaptor

  • Semi-Newbie
  • *
  • Posts: 44
Re: Stop Spammer
« Reply #1727 on: May 06, 2013, 09:12:38 PM »
I couldn't find in the documentation if it is possible to complitely block registrations pro stopfrumspam matches. Is it possible? If not, can I add this as a feature request? ;)

Thanks

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: Stop Spammer
« Reply #1728 on: May 06, 2013, 11:46:15 PM »
I couldn't find in the documentation if it is possible to complitely block registrations pro stopfrumspam matches. Is it possible? If not, can I add this as a feature request? ;)

Thanks
This mod only flags them after registering if caught in the database, not before.
~SugarD-x~

Offline SnowRaptor

  • Semi-Newbie
  • *
  • Posts: 44
Re: Stop Spammer
« Reply #1729 on: May 07, 2013, 01:09:43 AM »
Sorry, I was not clear. I was asking if, instead of sending the spammers registration to be manually approved, it is possble to completely remove them automatically.

My forum uses manual approval of members because of recurrent trolls and the spammers end up polluting the approval page.

Offline Kindred

  • Support Specialist
  • SMF Master
  • *
  • Posts: 31,458
  • Gender: Male
    • wagner999 on Facebook
    • @Kindred_999 on Twitter
Re: Stop Spammer
« Reply #1730 on: May 07, 2013, 02:08:14 AM »
No, you were clear....

But the mid does not do that and would require recoding to do so...
And considering the number of false positives from sfs, I would suggest that never be an option..,
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support forums.  Thank you.

Offline SnowRaptor

  • Semi-Newbie
  • *
  • Posts: 44
Re: Stop Spammer
« Reply #1731 on: May 07, 2013, 02:41:53 AM »
Thanks.

Well, the "flags" are already a big help.

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: Stop Spammer
« Reply #1732 on: May 08, 2013, 05:14:33 AM »
Please don't open the above images guys. They are malicious.
~SugarD-x~