In the most recent code $Id: captcha.inc,v 1.2 2007/01/31 09:46:06 heine , there is a problem in that the !file_check_directory($fonts_path) test is used throughout.
file_check_directory() (defined in file.inc) does not return a valid result UNLESS the directory is writable to the web server, which means that a 'valid' system font path such as /usr/local/share/fonts/ (not normally writable to the webserver) will not work to supply fonts to the Captcha module.
Solution: rewrite captcha.inc to use the PHP function is_dir() since the module only needs read access to the font files.
Workaround: make a directory 'fonts' inside your Drupal files directory: eg. files/fonts and copy some ttf font files there to use in the configuration of Captcha
The workaround should be noted somewhere very visible until the code is patched because a lot of users are having problems setting up Captcha
Comments
Comment #1
quicksketchfreephile, could you create a patch with your suggestions? Such an approach is much more likely to make it into the module.
Comment #2
Andy Ramblings commentedHiya,
My path to the TTF folder (my TTF fonts) is writeable, but I still get invalid font folder, no matter what I enter.
I have my fonts located in the following folder:
/sites/modules/ttf
It just once accept it at all. Also, with the latest version of CAPTCHA to which textimage is mainly used for, it doesn't show up in the drop down list...
Other than that, It worked great on drupal 5 in a PHP 4 environment, now I used PHP 5, it doesn't want to work.
Comment #3
danielb commentedSame with background path... I spent an hour trying to figure out why it kept saying "this image directory doesn't exist" or something... but actually it lied... it wasn't writable...
Comment #4
decipheredApparently fixed a while back.