Page 45 of 45

Re: [RC2] Anti Bot Question

Posted: Sun May 11, 2008 1:54 pm
by rreptile
rlasker3 wrote:I was also quite happy with this MOD until about 3 days ago when I got flooded with thousands of Porn posts. Not sure how they are getting past the registration MOD or what I can do to prevent it from here on out.
Try changing all the answers to your questions. Make sure that the answers are NOT in the questions themselves. Also, make sure that none of the answers are the same as any of the defaults

Example of UNrecommended question and answer:
Q. Of the two, which is red? apple or lemon?
A. apple


Example of question and answer that is more likely to foil the bots:
Q. Apples are red; what colour are lemons? (Hint: six letter word starting with "y")
A. yellow

Re: [RC2] Anti Bot Question

Posted: Tue Jun 17, 2008 10:08 am
by RJPotts
Just wanted to say many thanks to the author of this mod.

Also thanks to Erian. I was having the mysql_free_result error and found that his message, copied below, sorted things out for me.

Cheers
Richard
Erian Hendvarden wrote:
the_void wrote:Hi,

I've been looking at the mysql_free_result() error that lots of people seem to get, and I have located the 2 lines in question i believe have been causing the problem. I am using version 3.0.0

Both the lines are in the includes/functions_abq.php file.

The first error occurs at line 67 ...

I tried the following change to line 63 which i believed would create the $result variable..

Code: Select all

if (!$db->sql_query($sql))
to

Code: Select all

if (!($result = $db->sql_query($sql)))

However this did not remove the error so i ended up commenting line 67 out...

The second error occurs on line 115.
This one i solved by moving it inside the previous if statement (above line 114). This error should only occurs when multiimages is off as i believe it has incorrectly been placed outside the loop.

I hope this helps the people who want to solve the error rather than simply suppress the error message. To date i have had no problems with this solution, and i have not seen any other mysql_free_result() errors.
I took a look at this code also, and I agree with this solution. I've installed this mod with absolutely no problems except this on an already modified 2.0.22 board. Using this fix, it runs great. One suggestion I would like to pass on when installing such mods... don't just make a backup... leave your active board alone so users are not interrupted and (this is assuming shell access, but can also be done via ftp in a round about way) instead make a "sandbox" (you can see mine at sandbox.dubrin.net - it is almost always disabled except when I'm working on it ;) ) by:

-- In your main web directory, ABOVE your forum directory, cp -R forum/ sandbox/
-- Edit your config.php to point to a new database (ie. sandbox_ instead of phpBB_)
-- Using your favorite database admin tool (ie phpMyAdmin) COPY your entire structure AND data from your existing database to the new.
-- Then perform all modifications in your sandbox. I, as shown by the link, use a subdomain for quick testing.
-- Don't forget that you need to make ALL database updates to BOTH databases. The sandbox when you begin, and the live forum when you copy the code over.
-- To finish and copy the code over, in main directory ABOVE forums, cp -R sandbox/ forum/
-- And then reedit the config.php (since I use joe I can at this point just do a cp config.php~ config.php) to point to your main database.

Obviously this wont work for everyone, but man does it make debugging so much better because your forum can stay live.

On a side note: I'm adding a little hook to this that will log the IP address of all failed attempts to a file, then upon a successful attempt remove from the file. Then I can periodically take said file and add it to my ban lists on the forum, and to my .htaccess deny list on the entire website. Yay! Die Spammers Die :)

Re: [RC2] Anti Bot Question

Posted: Tue Aug 12, 2008 7:25 pm
by cariel
is->query_result;
}

if ( $query_id )
{
unset($this->row[$query_id]);
unset($this->rowset[$query_id]);
mysql_free_result($query_id);

return true;
}
else
{
return false;
}
}
[/code]

Nevermind! It's too frustrating *blushes* so I'm going to go another route.