AW: [PEAR] Problem with CAPTCHA
| From: | Alexander Naumann | Date: | Thu, 26 Jul 2007 12:54:11 +0000 |
| Subject: | AW: [PEAR] Problem with CAPTCHA | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27743@lists.php.net to get a copy of this message | ||
Hi Firman,
Great! Now everything works ! Thank you very much.
Alexander
-----Ursprüngliche Nachricht-----
Von: Firman Wandayandi [mailto:firmanw@gmail.com]
Gesendet: Donnerstag, 26. Juli 2007 14:47
An: mail@herrnaumann.de
Cc: PEAR-GEN
Betreff: Re: [PEAR] Problem with CAPTCHA
On 7/26/07, Alexander Naumann <mail@herrnaumann.de> wrote:
>
>
> -----Ursprüngliche Nachricht-----
> Von: Firman Wandayandi [mailto:firmanw@gmail.com]
> Gesendet: Donnerstag, 26. Juli 2007 13:09
> An: mail@herrnaumann.de
> Cc: pear-general@lists.php.net
> Betreff: Re: [PEAR] Problem with CAPTCHA
>
> On 7/26/07, Alexander Naumann <mail@herrnaumann.de> wrote:
> > Dear Sirs,
> >
> > I successfully installed both packages Image_Text-0.6.0beta and
> > Text_CAPTCHA-0.2.1. (at least there came an 'ok' in the last line) I
> > have an Apache running on an XP-machine, from xampp-win32-1.5.5.
> > I've tried numerous example scripts to generate a CAPTCHA but I always
> > saw just a placeholder for the image. At least one example even showed
> > proper text so the .ttf file was found. According to Phpinfo.php the
> > GD support is enabled. Could you help me please?
> >
>
> Any error message on the page? Usually it's about font problem, make sure
> that font is available or just change it with a font you have in your box.
>
> --
> Firman Wandayandi <http://firmanw.org/>
>
>
> I used the example-script in CAPTCHA.php and checked with file_exists() if
> the ttf-file was accessible. Ok.
>
Okay, lets see a provided example right on the "CAPTCHA_test.php" line
42-47:
-- snip --
// Set CAPTCHA image options (font must exist!)
$imageOptions = array(
'font_size' => 24,
'font_path' => './',
'font_file' => 'COUR.TTF'
);
-- /snip --
"font_path" is a directory of font file located and "font_file" is a
filename (without directory) of font file.
'font_file' => 'C:/something/font.ttf' doesn't works, should be
something like this:
'font_path' => 'C:/something',
'font_file' => 'font.ttf'
Did you right on here?
Also please send a reply to pear-general@lists.php.net too so anyone
can read this thread.
> The error message:
>
> >>Please enter the text in the image in the field below!
> >>Error generating CAPTCHA!
>
> Thanks
>
>
>
--
Firman Wandayandi <http://firmanw.org/>