SimpleMath AntiSpam Module
pavel.pola
Joined: 2007-05-19
Posts: 30 |
Posted: Thu, 2008-07-03 19:23 | |||
Hello, I was getting angry with captcha module in G2, because it didn't work as I expected - it still let bots pass the verification. So I've made a really simple anti spam module - it just displays simple math question (like "how much is two and one?") and it expects getting correct result from the POST. The very first version is just static - the question and the answer is hardcoded in the template and validation class, but if somebody wants to make it "randomized", feel free. I plan to add more "simple stupid questions" which should prevent bots from abusing my comments. Enjoy it... _________________________________
|
||||
Posts: 5
I tested the above plugin in my Gallery 2.3-RC-1, and now after login and answering the simple math prob, I get a blank http://gallery.example.com/main.php page.
Unable to login properly, so I can't disable the plugin. Tried manual removal via phpmyadmin, but unsuccesful - still getting the same math question and then blank page like above.
Tried this: http://codex.gallery2.org/Gallery2:FAQ#How_can_I_deactivate_a_module_when_I_am_unable_to_login.3F
- also unsuccessful.
Would appreciate help to disable this plugin properly, so that can login normally. Thanks.
Posts: 4342
@blank page: usually a php error
see: http://codex.gallery2.org/Gallery2:FAQ#I_get_only_a_blank_screen_when_trying_to_view_my_Gallery.2C_what.27s_wrong.3F
@disable plugin:
are you sure you did *both* edits to the db tables, with the correct module name?
Posts: 5
You mean these lines (plugin is called 'commentantispam').
UPDATE g2_PluginMap SET g_active=0 WHERE g_pluginId='commentantispam';
DELETE FROM g2_FactoryMap WHERE g_implModuleId='commentantispam';
Yes, I did. And did manual flushing of the cache too.
Posts: 30
This plugin isn't tested nor tried on 2.3 Gallery. Could you please send me a php error you are getting? Maybe something has changed in module interface but I'm not going to install pre-release versions of Gallery.
_________________________________
Please visit my personal gallery: http://www.pavelpola.cz (mostly B&W pictures, Prague, nature, people)
Posts: 5
Hi Pavel,
I found the error msg on the server log:
[Tue Aug 26 10:26:21 2008] [error] [client 218.111.211.81] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nuraacom/public_html/album/modules/commentantispam/classes/SimpleMathValidationPlugin.inc:67) in /home/nuraacom/public_html/album/modules/core/classes/GalleryPhpVm.class on line 142, referer: http://album.nuraina.com/main.php?g2_view=core.UserAdmin&g2_subView=core.UserLogin&g2_return=%2Fmain.php%3F
Posts: 5
Actually I had the same problem in 2.2.5. Anyway the server error msg is attached above. Hope you can help solve this prob. Thanks.
Posts: 30
I'm using this plugin on 2.2.5 version of Gallery Core - as you can test on my site. I don't know why it happened but did you disable the old captcha plugin? What other plugins are you using? Naybe the problem is when both captcha plugins are allowed to modify the page. If you look into the source code - there is no line 67 in SimpleMathValidationPlugin.inc, so I hope the problem is somewere else - maybe some collision with another plugins you are using.
_________________________________
Please visit my personal gallery: http://www.pavelpola.cz (mostly B&W pictures, Prague, nature, people)
Posts: 5
Thanks, Pavel. Will take a look at this possibility.
Posts: 1
Hi, I have the same problem Naim.
I have installed commentantispam and after login i have blank page.
Would appreciate help to disable this plugin properly, so that can login normally.
I have tested and not work
UPDATE g2_PluginMap SET g_active=0 WHERE g_pluginId='commentantispam';
DELETE FROM g2_FactoryMap WHERE g_implModuleId='commentantispam';
and flush cache.
Thank you for your help
Posts: 1
Has anyone figured out how to resolve this. It just happened to me as well, and the steps listed do not seem to work for me either.