Getting Captcha Working

I've never had this problem before but it came up after I moved from a Windows 7 development machine to using Ubuntu 14.04.

I didn't notice anything amis until a client asked me to put Captcha on their site.  I got all my files of our git repository and a dump of the database so I felt that I had everything I needed but strangely "captcha" and "freeform:captcha" were not responding at all. In fact "if captcha" and "if freeform:captcha" branching always resulted in false!

Specifically I was using Freeform but the problem was in my setup not Freeform

It's got to be in the configuration so here are the things I checked:

  1. File permissions for the /images/captcha/ directory
  2. Make sure that require_captcha="yes" is a parameter of the freeform tag
  3. Member Captcha preferences in Members > Member Preferences > "Enable Membership CAPTCHA"
  4. Captcha Preferences for the Channel in Admin > Channel > Channel Preferences > "Enable CAPTCHA for Comment Posting?"
  5. Captcha for emails in Admin > Email Configuration > "Enable CAPTCHAs for Tell-a-Friend and Contact emails"
  6. The path to the Captcha folder in Admin > Security and Privacy > Captcha Preferences
  7. Use of True Type fonts for Captcha in Admin > Security and Privacy > Captcha Preferences
  8. The existence of these files: system/expressionengine/fonts/texb.ttf & system/expressionengine/config/captcha.php

I've listed all these things to check as it could be handy for debugging this problem if you come across it, however none of these things solved my problem.

GD image support library

Just in case I tried to install this php library

sudo apt-get install php5-gd
sudo service apache2 restart

Et Voila!

We have Captcha!

Merlin engine logo

The data revolution is here.

Merlin THE API builder for developers. Test it now

Get VIP access