2008年9月30日星期二

Re: [fw-mvc] Zend_Form_Captcha_Image and GD Font path problem

Hello,

It works ! I've specified the path and fix somes permissionss on filesystem.
What happens now is that i can see the captcha more 2 fields and when
I try to validate alway tell me that captcha value is invalid

Regards

Hector Virgen escribió:
> Try setting 'font' to 'arial.ttf'. I believe the GD library needs a
> path to the font, not a font name.
>
> -Hector
>
> On Tue, Sep 30, 2008 at 10:21 AM, SŽébastien Cramatte
> <scramatte@zensoluciones.com <mailto:scramatte@zensoluciones.com>> wrote:
>
> 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
>
>
>
>

没有评论: