[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.
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [RC2] Anti Bot Question

Post by IPB_Refugee » Wed Oct 10, 2007 3:58 am

Did you try it with the new file? You have to do this because your table prefix is not phpbb_ If you tried it with db_update.php you might have forgot to edit or to upload common.php Please doublecheck your installation.

There is no need to reinstall. If you don't want the MOD anymore, just upload the original (not modified) files to your server and delete all additional files that are from MagMo's MOD.

Good luck!
Wolfgang

tgrhein
Registered User
Posts: 4
Joined: Tue Oct 09, 2007 1:59 am

Re: [RC2] Anti Bot Question

Post by tgrhein » Sat Oct 13, 2007 7:28 pm

Just wanted to thank you for your help Wolfgang.

I decided I was in over my head and called a friend who does php programming for cell phones. He wasn't able to figure out why the db_update didn't work, so he just made the changes manually following db_update code. Everything is now back up and running, including the Anti Bot Question.

Thanks again,
TGRhein

Melika815
Registered User
Posts: 1
Joined: Sat Nov 03, 2007 12:23 am

Re: [RC2] Anti Bot Question

Post by Melika815 » Sat Nov 03, 2007 4:48 am

aunrea wrote:I had this problem:

Code: Select all

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in \db\mysql4.php on line 302

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in \db\mysql4.php on line 302
so I read this entire thread (a complete waste of my time) and found no solution. So I found the solution myself. When you installed your phpbb if you selected mysql 4/5 you will get that error. You just need to change to mysql 3. To do this go into your config file and remove the 4 after mysql like:

Code: Select all

$dbms = 'mysql';
You should not get that error message anymore.
Great MOD, MagMo, thank you! I was getting tired of deleting SPAMbot members and didn't know what I could do until I decided to search.

I only had two problems, the one quoted was one. The other was my own error by placing a bit of code in the wrong spot but I replaced the file and did it all over again with perfect results. This was my FIRST modification ever and I was stumped a little at first but with 42 pages of help topics and Google, I found the answers to my questions and got going.

If this is your first MOD, don't be intimidated. The directions are very straightfoward and easily followed. ^_^
It may be a lot of work, but it is worthwhile.

MODCAR
Registered User
Posts: 50
Joined: Thu Apr 28, 2005 2:09 am
Location: Wellington, NZ
Contact:

Re: [RC2] Anti Bot Question

Post by MODCAR » Mon Nov 12, 2007 9:05 am

I get this since install

Could not insert data into users table

DEBUG MODE

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_autospell, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (54, 'modcar', 1194857064, '9605f88395780130a31ec0d54e0d8c53', 'fraser@ray.org.nz', '', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, , 0, 1, 1, 0, 1, 1, 12, 'D M d, Y g:i a', 'english', 2, 0, 1, 0, '2da620')

Line : 694
File : usercp_register.php

dawidi
Registered User
Posts: 5
Joined: Wed May 18, 2005 9:13 am
Location: Bavaria, Germany

Re: [RC2] Anti Bot Question

Post by dawidi » Mon Nov 12, 2007 4:55 pm

from some pages before:
RussKaos wrote:I've managed to install the MOD correctly and it all appears to work until I went to attempt to test it by registering a new account. When I click on the 'Register' link the agreement screen appears exactly as it should but then when I click on 'I Agree to these terms and am over or exactly 13 years of age' it just refreshes the page.
A few posts down RussKaos says he solved it but doesn't go into details.
I had the same problem, solved it after reading his posts, and here's how:
This MOD, if applied naively, interferes with two other MODs I had previously applied: a CAPPA removal mod and a registration form variable changing mod.

In usercp_register.php, the ABQ MOD says to

Code: Select all

# 
#-----[ FIND ]------------------------------------------------ 
# 
		"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&agreed=true"),
		"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&agreed=true&coppa=true"))

# 
#-----[ REPLACE WITH ]---------------------------------------- 
# 
		// Anti Bot Question Mod - Start
		"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_name'] : "agreed") . "=" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_value'] . $abq_agreedPart2 : "true")),
		"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_name'] : "agreed") . "=" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_value'] . $abq_agreedPart2 : "true") . "&coppa=true"))
		// Anti Bot Question Mod - End

However in my file the line to edit was this:

Code: Select all

'U_AGREE' => append_sid("profile.$phpEx?mode=register&". AGREED_VAR ."=".AGREED_VAL))
I replaced it with

Code: Select all

		'U_AGREE' => append_sid("profile.$phpEx?mode=register&" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_name'] : "agreed") . "=" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_value'] . $abq_agreedPart2 : "true"))
		)
and now it works. Very fine mod otherwise :mrgreen:

//edit: oh, and before I got there I had to replace a

Code: Select all

		show_coppa();
with a

Code: Select all

		show_agreement();
somewhere in the same file.

Erian Hendvarden
Registered User
Posts: 1
Joined: Fri Nov 16, 2007 10:52 pm

Re: [RC2] Anti Bot Question

Post by Erian Hendvarden » Fri Nov 16, 2007 11:53 pm

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

matwii
Registered User
Posts: 1
Joined: Sun Nov 25, 2007 10:39 pm

Re: [RC2] Anti Bot Question

Post by matwii » Sun Nov 25, 2007 10:50 pm

Hello all,

I need a final statement on how to solve the issue of registering new users when installed
Anti Bot Question MOD 3.0.0. I have read all the posts and unfortunately I still not configured my phpBB forum.

Background info:

mysql_free_result() errors have been solved using post http://www.phpbb.com/community/report.p ... &p=3102915

However, I keep not been able to register new users as it says the "email address should be a valid one"

Do you know what should I modify?

Thank you in advance for your advise.

Madhoax
Registered User
Posts: 2
Joined: Mon Dec 03, 2007 3:43 pm

Re: [RC2] Anti Bot Question

Post by Madhoax » Mon Dec 03, 2007 3:45 pm

Thanks for this mod :D

I have one problem though. I installed the mod, but whenever I try to configure (in admin panel) or select another option in the "anti bot question mod", the page turns white....

What happens there?

mercer
Registered User
Posts: 29
Joined: Fri Mar 30, 2007 7:53 pm

Re: [RC2] Anti Bot Question

Post by mercer » Sat Dec 08, 2007 2:28 pm

Hi,

I have just installed this mod on http://www.subarucentral.com first thing the blocked reg counter isn't appearing at the bottom, but that doesn't matter so much.

Main problem is that when people try to register it says invalid session. For the time being I have disabled the mod on the site.

I have installed this mod on another site before http://www.fordtorque.co.uk and works fine, though I noticed the admin panel is different. Though I'm sure the version I've got backed up is identical to the one I installed on Ford Torque. Doesn't matter particularly though.

Thanks for your help

Mercer

Madhoax
Registered User
Posts: 2
Joined: Mon Dec 03, 2007 3:43 pm

Re: [RC2] Anti Bot Question

Post by Madhoax » Wed Dec 19, 2007 2:26 pm

I installed this mod succesfully. When in admin panel I turn the mod on, and try to register, I get the following message:
You must fill in the required fields.
Sorry, but this e-mail address is invalid.
I have used an correct email address and filled in all required fields. What can be done about this, anyone else experienced this?

tonysxx
Registered User
Posts: 1
Joined: Tue Dec 25, 2007 12:06 pm

Re: [RC2] Anti Bot Question

Post by tonysxx » Tue Dec 25, 2007 12:11 pm

I'm getting the "You must fill in the required fields" error too. I checked all the code and it looks good.
Have seen lots of others on other forums with the same issue.
Any ideas?

TYP0
Registered User
Posts: 1
Joined: Thu Jan 17, 2008 3:23 pm

Re: [RC2] Anti Bot Question

Post by TYP0 » Thu Jan 17, 2008 3:38 pm

When registering a new account I too was receiving
You must fill in the required fields.
Sorry, but this e-mail address is invalid.
After going back through the code I discovered I had made a typo at the stage noted below, putting the mod code inside the conditional statement block rather than after the block. I had overlooked the closing curly brace when finding $current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));. After correcting this the registration process worked as expected.

Code: Select all

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_register.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
	} // <- HERE'S THE CLOSING CURLY BRACE I MISSED!

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	if ($abq_config['abq_register'])
	{
		$abq_email_variable_name = $abq_config['email_variable_name'];
	}
	else
	{
		$abq_email_variable_name = 'email';
	}
	// Anti Bot Question Mod - End

User avatar
alan081954
Registered User
Posts: 145
Joined: Sun Oct 01, 2006 8:22 pm
Location: Adams,Tn.
Contact:

Re: [RC2] Anti Bot Question

Post by alan081954 » Fri Jan 18, 2008 4:32 pm

Got it installed and seems to be working,I did not have any problems before installing this,Just a precaution.

Cissell
Registered User
Posts: 80
Joined: Sat May 28, 2005 5:26 pm

Re: [RC2] Anti Bot Question

Post by Cissell » Sun Jan 27, 2008 3:07 am

Just installed this mod and it appears to be working good. Now when i go to the User Admin- Management page there is nothing below the Avatar section when i scroll down. What page did I modify that would cause this?

view it here http://nagca.com/jpg/opps.jpg
2.0.22

Wolf359Reddwarf
Registered User
Posts: 19
Joined: Mon Dec 10, 2007 3:04 am

Re: [RC2] Anti Bot Question

Post by Wolf359Reddwarf » Sun Jan 27, 2008 4:24 am

I followed the directions explicitly, and executed the SQL code in phpMyadmin, as written. The query was executed successfully, and all was working smoothly up until receiving this error message (which seems to be remarkably common, having read this thread):

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/datbasename/public_html/test/phpBB2/db/mysql4.php on line 318

The only thing I haven't found it this thread is an adequate fix, listed by the author of the mod himself/herself. It would be lovely to have both an explanation as to why this error is returned, and what the absolute fix would be. If magmod isn't around to troubleshoot, and correct the code error, might there be another individual equally as skilled with the relevant code (i.e. a phpBB support team member)?

From reading the thread, it appears that using an "@" sign hides the error, but it would be nice to have a fix pertaining to the source of the error, and the absolute solution.

Thanks in advance

Post Reply

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