Yii Framework Forum: Captchat Image Not Showing - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Captchat Image Not Showing Rate Topic: -----

#1 User is offline   anhduc.bkhn 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 09-September 12

Posted 16 January 2014 - 04:01 AM

Please, help me fix this.
I don't know whay Captchat image not showing ?

check gd ext: passed.
Yii version 1.1.12

Code Model Contact.php
public $validacion;

array('verifyCode', 'captcha', 'allowEmpty' => !CCaptcha::checkRequirements(), 'captchaAction' =>
                'about/captcha', 'on' => 'useCaptcha'),

Code AboutController.php
public function actions()
    {
        return array(
            'captcha' => array(
                'class' => 'CCaptchaAction',
                'backColor' => 0xFFFFFF,
            ),
        );
    }



Code View
 <?php if (extension_loaded('gd')): ?>
                <?php if (CCaptcha::checkRequirements()): ?>
                    <div class="row">
                        <?php echo $form->labelEx($model, 'verifyCode', array('class' => 'label-contact')); ?>
                        <div class="captcha">
                            <?php
                            $this->widget('CCaptcha', array(
                                'captchaAction' => 'about/captcha'
                            ));
                            ?>
                            <?php
                            echo $form->textField($model, 'verifyCode', array(
                                'placeHolder' => Yii::t('contact', 'Captcha'),
                                'class' => 'input-contact'));
                            ?>
                            <font color="red"><?php echo $form->error($model, 'verifyCode'); ?></font>
                        </div>
                    </div>
                    <!--                <div class="row">
                                        <label class="label-contact">&nbsp;</label>
                                    </div>-->
                <?php endif; ?>
            <?php endif; ?>

0

#2 User is offline   yugene 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 497
  • Joined: 08-August 09

Posted 16 January 2014 - 10:37 PM

First of all I would check that proper access rules are set up to allow captcha action access and if CCaptcha::checkRequirements() returns true.
0

#3 User is offline   KonApaz 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,311
  • Joined: 21-February 11
  • Location:Greece

Posted 17 January 2014 - 06:24 AM

Hi

Check accessRules of your controller.
Also check with firebug the http request about/captcha, what is the results ?
Yii is the best php framework in the world!
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#4 User is offline   Yahya Sönmez 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 26-October 11
  • Location:Ankara

Posted 03 March 2014 - 03:53 AM

Hi,

pls check files (/config/main.php or other related files) encoding format,

encoding process;
- open [YOUR].php file with Notepad++ editor
- Encoding / Encode in UTF-8 without BOM
- Save
~ α ѕєηισя ѕoғтwαяє dє√єʟσρєя ~
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users