NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR CAPTCHA Problems

Gary Mort bz-gmort at beezifies.com
Wed Aug 29 19:43:55 EDT 2007


Find a ttf file, any ttf file(if your using windows, take a look in your 
control panel->fonts folder

Upload it to the server and put it somewhere readable by your web program.

Set the options appropriately, ie:

|// Set CAPTCHA options (font must exist!)
$options = array(
    'font_size' => 24,
    'font_path' => './',
    'font_file' => 'COUR.TTF'
);

Where font_path is the full path to your font file
and font_file is your font file(make sure case matches!)

Make sure to pass your options to the functions that require them.


A little prayer couldn't hurt. :-)

(Captcha images are a royal PITA due to the font issues, ability to write to the correct directory, and whether or not you have GD or freetype or ImageMagick or whatever they want installed)



|





More information about the talk mailing list