Hi Everyone
I use a lot of times the default captcha with Yii, almost without problem
Today I try to show the captcha on a module but the captcha image is broken (no image appearing). The other components of captcha (links, error matching code etc) seem to work correctly
My code in module Controller is
public function actions() {
return array(
'captcha' => array(
'class' => 'CCaptchaAction',
'backColor' => 0xFFFFFF,
),
);
}
In module view
<?php if (CCaptcha::checkRequirements()): ?>
<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>
<?php echo $form->error($model, 'verifyCode'); ?>
</div>
<?php endif; ?>
And in model
public $verifyCode;
....
public function rules() {
return array(
....
....
array('verifyCode', 'captcha', 'allowEmpty' => !CCaptcha::checkRequirements()),
);
}
The Same code with Controller/action/model/view as we all know
Why I have this problem?
Thanks