문제

I meet a very strange problem,I used sfPHPCaptchaPlugin to make captha to my form in sf1.4 project I worked on,all configuration and installation of plugin is correct but the captcha verification won't let me save data of form in database and tell me that the text is wrong but I'm sure I entered the same text showing in image of captcha and here is the line who get me the error :

'captcha'       => new sfValidatorPHPCaptcha(array(), array('invalid' => 'The following code is invalid.')),

Someone had the same errore before please?

도움이 되었습니까?

해결책

sfPHPCaptchaPlugin is not stable for symfony 1.4 as it said in the plugin information Here.

You can use sfCaptchaGDPlugin its a very good one, folow the intalation guide in README, and use this widget:

$this->widgetSchema['captcha'] = new sfWidgetCaptchaGD();

$this->validatorSchema['captcha'] = new sfCaptchaGDValidator(array('length' => 4));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top