2008年9月30日星期二

[fw-mvc] Zend_Form_Captcha_Image and GD Font path problem

Hello,

I'm running ZF 1.6 and I would like to test Zend_Form_Captcha_Image.
My server runs debian lenny and php 5.2.3 with GD

When I call the form with captcha element I obtain these error

Warning: imageftbbox() [function.imageftbbox]: Could not find/open font
in /home/vhosts/d/default/library/Zend/Captcha/Image.php on line 388
Warning: imagefttext() [function.imagefttext]: Could not find/open font
in /home/vhosts/d/default/library/Zend/Captcha/Image.php on line 391

--- ZEND FORM extract ---
...
$elt = new Zend_Form_Element_Captcha('foo', array(
'label' => "Please verify you're a human",
'captcha' => array(
'captcha' => 'Image',
'font' => 'arial',
'imgDir' => './share/img/captchas/',
'wordLen' => 6,
'timeout' => 300,
),
));

$this->addElement($elt);
...
---

I've installed arial.ttf in my www root and I've setup GDFONTPATH env
variable to point to this dir.
Unfortunately doesn't works


Thank you for your help

Best regards

没有评论: