In my Zend Application, I am facing an abnormal problem with the Captcha element. When I try to view the form in which I had used this Captcha element on my local machine it is working fine, but when I upload it to my Debian Server It is not working properly…!!!
Difference is as follows:
As you can see on localhost the text inside the captcha is shown to the user, Where as on the Server[Debian], the text is missing!!!!!
I had used followig code to create the Captcha Element on my Zend Form:
$elements = array();
$captchaElement = new Zend_Form_Element_Captcha('captcha',
array('label' => "Ihr generierter Textcode:",
'captcha' => array('captcha' => 'Image',
'name' => 'myCaptcha',
'wordLen' => 5,
'timeout' => 300,
'font' => 'verdana.ttf',
'imgDir' => 'captcha/',
'imgUrl' => '/captcha/')
)
);
$elements[] = $captchaElement;
foreach ($elements as $index => $element)
{
$element->setAttrib('tabindex', ($index + 1));
}
Can anyone tell me What mistake I am doing…?
Thanks In Advance…..
Set absolutely path for font and images:
What ZF version do you use? Cause after 1.7 there a bug in decorator, you have to set own decorator otherwise Zend_Captcha doesn’t work:
Decorator_Captcha file below