Capctha display the same image

Hi,

I was wondering why my capctha is always display the same image until I click on "Get new code" then it will change. Anyone can help? It also happened on the Contact us page generated by yiic.

FYI, I am running it on Windows XP Pro, XAMMPP and Firefox as the browser.

Thx,

Daniel

When you refresh the page that contains the captcha (without submitting the form), the image will stay the same. If you submit the actual form, the image will change when testLimit has been reached.

Hi,

Thank you very much for the explanations.

Regards,

Daniel

Hi,

Btw, how could I set the testLimit?

I just add this code in my controller




...

public function actions()

{

   return array(

      'captcha'=>array(

         'class'=>'CCaptchaAction',

         'backColor'=>0xFFFFFF,

      ),

   );

}

...



and I put this code under the view




...

<?php if(extension_loaded('gd')): ?>

   <div class="row">

      <?php echo $form->labelEx($model,'verifyCode'); ?>

      <div>

         <?php $this->widget('CCaptcha'); ?>

         <?php echo $form->textField($model,'verifyCode'); ?>

      </div>

      <div class="hint">

         Please enter the letters as they are shown in the image above.

         <br/>Letters are not case-sensitive.

      </div>

   </div>

<?php endif; ?>

...



Where should I put the "testLimit"?

Thank you for the help.

Where you put the other properties:




   return array(

      'captcha'=>array(

         'class'=>'CCaptchaAction',

         'backColor'=>0xFFFFFF,

         'testLimit'=>3,

      ),

   );



Hi,

Had the same trouble with captcha (in v1.1.1 r1907): it doesn’t refresh, even after submitting the form, and it ignores “testLimit”. It only refreshes after clicking on “get new code” button.

But in v1.0.8 it works like it supposed to…

I have same problem, trying change testlimit but image refresh only if click Get new code.

Using latest version 1.1.7