[TAC] Stop Country Spam

[TAC] Stop Country Spam [Paid] 3.1.5

No permission to buy ($19.00)
That's correct, don't use that API (it seems to be down, or at least it was 5 mins ago, it's unreliable)
Use the one I mentioned above
 
This would be even better with an option to simply block all access, not just registration. It's already using country IP blocks to stop registration, why not just an option to increase that to full site access? The see nothing... your country has been blocked from viewing this website, or such! :)
 
Have you set it up on a real environment, if so, just set the JSON Request and index name to the following:

JSON Request: http://api.wipmania.com/{$ip}
Index Name: (none)

do not change $ip.. this is exactly how it should look if using this request site:


View attachment 52483

I could add this by default, but I don't want a particular JSON request site to find they are getting too many requests.

I would also recommend registering on wipmania and getting a key (it's free), you'll then be allowed unlimited requests. Let me know how you get on

Getting this error using that setup:

Code:
array(3) {
  ["url"] => string(37) "http://www.girlsforum.com/login/login"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["login"] => string(11) "LALEBEACTOR"
    ["register"] => string(1) "1"
    ["password"] => string(8) "********"
    ["cookie_check"] => string(1) "1"
    ["redirect"] => string(12) "/login/login"
    ["_xfToken"] => string(8) "********"
  }
}
 
That's not the error, that's the request that triggered the error. What is the actual error (it should have a line number associated to it), and the stack trace?
 
Mike, getting an error with this on 1.2, stopping all registrations. The registration page simply produces:

An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/mycombat/public_html/library/Zend/Db/Statement/Mysqli.php on line 77

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
  5. Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 48
  6. XenForo_Error::unexpectedException() in XenForo/Application.php at line 362
  7. XenForo_Application::handleException()
Disabling it allows registrations. It isn't logging anything in the server error log.
 
From that error alone, that's a database issue (your local database)...
You server has gone away (it can't connect to your database), that's not related to the plugin

I am using StopCountrySpam on 1.2

If you could point me to your site and turn it on, i can take a look. But I strongly suspect this was a temporary issue with your database/server
 
I've tried to register, I haven't seen the issue

The tables are:
sf_stopcountryspam_log
sf_stopcountryspam_iso3166_codes

But that error suggests it can't connect to your database at all (or reach the server), so I dont think the tables are broke
 
Edit.. hmm, if an uninstall - reinstall fixed it, then this probably was one of the tables that got broke (or the logs in sf_stopcountryspam_log got too large, these can be cleared at any time from the ACP)


What I might do, is put some sensible limits / cron job clearing on these tables, nobody needs a years worth of spam logs (do they?)
 
@tenants, I've gotten the below twice in my server error log

Code:
#0 /var/www/twowheel/library/Tac/StopCountrySpam/ControllerPublic/Register.php(588): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/var/www/twowhe...', 588, Array)
#1 /var/www/twowheel/library/XenForo/FrontController.php(337): Tac_StopCountrySpam_ControllerPublic_Register->actionFacebook()
#2 /var/www/twowheel/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /var/www/twowheel/index.php(13): XenForo_FrontController->run()
#4 {main}
Code:
array(3) {
  ["url"] => string(48) "http://twowheeldemon.com/register/facebook?reg=1"
  ["_GET"] => array(2) {
    ["/register/facebook"] => string(0) ""
    ["reg"] => string(1) "1"
  }
  ["_POST"] => array(0) {
  }
}

nginx log
Code:
123.242.172.4 - - [25/Aug/2013:03:25:00 -0500] "GET /register/facebook?reg=1 HTTP/1.0" 200 18537 "http://twowheeldemon.com/register/facebook?reg=1" "Mozilla/5.0
(Windows NT 6.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
 
Last edited:
Register.php(588) is this

Code:
$writer->set('request_response', $jsonResponse);
Which implies the response isn't getting set (which further implies the 3rd party site isn't responding)

Does it only happen with Facebook registrations?

It wont stop the registration (I don't believe they will see the error), it's just that this wont get logged. I think this is only happening when the 3rd party site is down (I should set these variables in such cases).

It should be an easy fix (although, I would check the third party site that you use)
 
Last edited:
Can you try this file, and let me know if you still see the error in the logs:

(change Tac/StopCountrySpam/ControllerPublic/Register.php to Register.old.php and put this file in it's place)
 

Attachments

Can you try this file, and let me know if you still see the error in the logs:

(change Tac/StopCountrySpam/ControllerPublic/Register.php to Register.old.php and put this file in it's place)
Installed it and will see what it does. thanks.
 
Can you try this file, and let me know if you still see the error in the logs:

(change Tac/StopCountrySpam/ControllerPublic/Register.php to Register.old.php and put this file in it's place)
Code:
ErrorException: Fatal Error: syntax error, unexpected '$countryCodeIndex' (T_VARIABLE) - library/Tac/StopCountrySpam/ControllerPublic/Register.php:521
Generated By: Unknown Account, Today at 9:24 PM
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(48) "http://twowheeldemon.com/register/facebook?reg=1"
  ["_GET"] => array(2) {
    ["/register/facebook"] => string(0) ""
    ["reg"] => string(1) "1"
  }
  ["_POST"] => array(0) {
  }
}
This is what I am getting now.
 
Top Bottom