View Full Version : Captcha: inconsistent behaviour?
joana
01-03-2008, 01:58 PM
I get some errors with Captcha 1.0 for Pixelpost 1.7 RC1.
One is the common "Wrong code entered (...) looks like you are a robot" one; the other is that it can't find the Save Comment page (404 error).
Already uploaded the latest version of Pixelpost like told here http://www.pixelpost.org/forum/showthread.php?t=7570
Sometimes it just works fine (see my test here, both comments with the fake text: http://www.joanagarrido.com/photoblog/index.php?showimage=711 ), but this is quite unsettling.
Thank you.
Dennis
01-04-2008, 11:19 AM
I'm not sure why this behavior shows itself on your blog. I merely transformed the code, written by other people, to a full addon. Unfortunately supporting the captcha addon is not a high priority for me since captchas are annoying, outdated and can easily be circumvented.
joana
01-05-2008, 02:46 AM
So, what is a better alternative to this?
jaywilliams
01-05-2008, 07:52 PM
Defensio
http://www.pixelpost.org/extend/addons/defensio-for-pixelpost/
massin
06-06-2008, 02:50 PM
Ran into a similar problem with intermittent robot warnings... seems that the use of '$digit' conflicts with the value of $_SESSION['digit'] if use_globals is enabled (which my ISP has enabled by default). This manifested itself when you changed pages from one image to another... when the session file existed already and was read by 'session_start()' it would overwrite the value generated and stored in '$digit'. I just added an 'x' to the end of '$digit' to make it different.
Modified code from 'libraries/captcha.php'
$digitx = "$cnum[0]$cnum[1]$cnum[2]$cnum[3]$cnum[4]";
error_log ("CAPTCHA: " . getenv ("REMOTE_ADDR") . " generated number: " . $digitx , 0);
session_start();
$_SESSION['digit'] = $digitx;
Cheers!
Dennis
06-06-2008, 07:36 PM
thanks. But register globals to on is so not a good practice. PHP has this directive off by default. We write code in such way this directive is off.
massin
06-14-2008, 09:28 PM
I don't disagree... but in this case I don't control the configuration for PHP (as would be the case for a lot of people who are using a hosting service). At any rate, perhaps worth keeping in mind for both developers and users alike. Thanks!
parallax
11-03-2008, 06:06 PM
I had the same problem. Correct code as massin describes. Problem solved. Thanks a lot
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.