Captch can't display in /backend

Hi everybody!

In /frontend , captcha is displayed normally,but also with that configuration in /backend, it can’t be display.

I have taken a lot of time for this, but can’t find out answer.

Anybody have any ideas for this?Thanks.

How many hosts you’re using? What’s the URL of captcha image?

I only use app on the same host.

This is my demo code:

In /frontend:

<?= $form->field($model, ‘verifyCode’)->widget(Captcha::className()) ?>

And in /backend I also config that.

Do i need to set URL of captcha image as ‘captchaAction’=>’/site/captcha’ in the widget at /backend ?

Yes, you need to set it.

I have set ‘captchaAction’=>’/site/captcha’ to /backend, but no result.

Do you have captcha action in backend/controllers/SiteController?


But if I use that captcha action or not, the result no change.

Check net panel in Chrome or FF debugger then to find out what’s wrong with getting image.


I have checked all debugger pannel of Chorome, FF, IE, Opera, but I can not find out any errors, warning.

I can not really understand this. :)