Concrete5: How to fix the issue of captcha images not displaying in your web pages

Here is one way I have found to fix an issue in Concrete5 where your captcha images are not showing up.

Navigate to  concrete/helpers/validation/ on your server and open captcha.php.

Find this block of code:

class ValidationCaptchaHelper {

   private $securimage;
	public function __construct() {
		Loader::library("3rdparty/securimage/securimage");
		$this->securimage = new Securimage();
		$this->securimage->ttf_file = DIR_LIBRARIES_3RDPARTY_CORE . '/securimage/elephant.ttf';
	}

And change it to:

class ValidationCaptchaHelper {
   private $securimage;
	public function __construct() {
		Loader::library("3rdparty/securimage/securimage");
		$this->securimage = new Securimage();
		<span style="color: #ff0000;">$this->securimage->use_gd_font = true; $this->securimage->gd_font_file = DIR_LIBRARIES_3RDPARTY_CORE.'/securimage/gdfonts/caveman.gdf';</span>
		$this->securimage->ttf_file = DIR_LIBRARIES_3RDPARTY_CORE . '/securimage/elephant.ttf';
	}

The text in red is the text that you are adding to the original block of code.

This worked for me but let me know if it doesn’t work for you.

  • Bill

    Thank you for this post! This issue was driving me crazy and your fix worked flawlessly. Many thanks for sharing this.

    • http://thelibzter.com Libby Fisher

      Glad to hear it, thanks for letting me know!