Author: Steven Neiland
Published:

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

If you use the captcha cfimage option on a Railo install on linux you may encounter an issue where the captcha text is missing. To fix this you need to install windows fonts. Here is how I did this on Slackware.

Aside: I don't advocate the use of captcha images. I think they are a flawed and outdated solution to the problem of nuisance bots.

Step 1: Copy Windows TTF Files

The first step is obviously to get the standard windows font files. So start up a windows machine and copy all the ttf font files in "c:\windows\fonts\" to a shared location such as a pen drive. Next copy them to your linux box into the fonts directory. On slackware this is located at "/usr/share/fonts/TTF/".

Step 2: Set Permissions

Now run the following commands in this directory to set the required permissions and access settings on these files.

chown root.root *.ttf
chmod 644 *.ttf

Step 3: Load Into Slackware

Next we load the new font files into Slackware with these commands.

mkfontscale
mkfontdir
fc-cache

Step 4: Restart Railo

With the fonts installed restart Railo and the captcha function of cfimage should now be working.

What Do You Think?

Reader Comments

New to slack's Gravatar
New to slack
Saturday, June 21, 2014 at 1:07:15 PM EDT

Worked for me. Thanks

Post a Comment

Comment Etiquette:

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain or appear to be advertisments, will not be published.
  • Comments that appear to be created for the purpose of linkbuilding to commercial sites will be removed.

We are all adults here so play nice.

*
*



Archives Blog Listing

Tag Listing

Learn CF In A Week

Treehouse

 
Fork me on GitHub