Re: [pear-webmaster] Error initializing Image_Text
| From: | Daniel O'Connor | Date: | Fri, 21 Aug 2009 06:34:04 +0000 |
| Subject: | Re: [pear-webmaster] Error initializing Image_Text | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-30008@lists.php.net to get a copy of this message | ||
1) You want pear-general, not pear-webmaster :)
2) Sounds like .... the fontfile isn't found or readable
Try putting a full path or otherwise checking with file_exists() and
is_readable() to where your TTF lives...
ie
$font_file_path = 'COUR.TTF';
if (!file_exists($font_file_path)) {
die("Oh noes: " . $font_file_path . " can't be found - we're in " .
getcwd())
}
$options = array();
$options['font_file'] = $font_file_path;
On Fri, Aug 21, 2009 at 8:56 AM, Alexander Bighill <alex@spiretech.com>wrote:
> Hello,
>
> I'm a first-time PEAR user and I'm stuck trying to figure out this error.
> The examples I tried for the Text_CAPTCHA package give this common error:
> " Error generating CAPTCHA: Error initializing Image_Text (Fontfile not
> found or not readable.)! "
>
> The imageOptions array attributes 'COUR.TTF' as the 'font_file'.
>
> Since this is a bit new to me, I'm not even sure of the right question to
> ask....
> Any advice is greatly appreciated.
>
> Thanks
> --
> Alexander
>
> --
> PEAR Webmaster Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>