[RC2] Anti Bot Question

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Registered User
Posts: 166
Joined: Wed Oct 06, 2004 12:51 pm
Location: Canada

Re: [RC2] Anti Bot Question

Post by rreptile » Sun May 11, 2008 1:54 pm

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
- Reactionary (So... have you backed up your files lately? This is even more important if you're staying with phpBB2)

Registered User
Posts: 4
Joined: Tue Dec 05, 2006 8:46 pm

Re: [RC2] Anti Bot Question

Post by RJPotts » Tue Jun 17, 2008 10:08 am

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.

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))

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 :)

User avatar
Registered User
Posts: 13
Joined: Thu Feb 28, 2008 1:32 pm

Re: [RC2] Anti Bot Question

Post by cariel » Tue Aug 12, 2008 7:25 pm


if ( $query_id )

return true;
return false;

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

Post Reply

Return to “[2.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 18 guests