Problem with captcha widget

I’ve got following problem:

I want to use captcha widget, i’m doing everything the same as in default Contact Form, but the captcha image doesn’t load.

That’s view form:


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

<div class="simple">

	<?php echo CHtml::activeLabel($model,'verifyCode'); ?>

	<div>

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

	<?php echo CHtml::activeTextField($model,'verifyCode'); ?>

	</div>

	<p class="hint">Please enter the letters as they are shown in the image above.

	<br/>Letters are not case-sensitive.</p>

</div>

<?php endif; ?>

I’ve also added function Actions() to Controller and proper code to My model, but that still doesn’t work.

What I’ve missed ??

Excuse my poor English ;)

Is gd library enable?At my site I had to include captcha action to accessRules also-I had many restictions.

oh, You’re right :D

I forgot add captcha to accesRules.

Thanks :)