MyBB Community Forums

Full Version: Captcha not readable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have already post about this problem here but I was not enough precise.

This problem is viewed with both firefox 3 and IE 7 browsers and maybe all the others.

This problem occurs in captcha generation when webhoster disable the phpinfo() function.

The gd_version() method of captcha.php is parsing phpinfo() return to get the GD version.

The right way to do this is to use the gd_info() method provided with GD library with PHP since PHP 4.3.0.

The gd_version() of captcha.php should be replaced by this one:
function gd_version()
{
   static $gd_version;
	
   if($gd_version)
   {
      return $gd_version;
   }
   if(!extension_loaded('gd'))
   {
      return;
   }

   $gd_info = gd_info();
   preg_match('/\d/', $gd_info['GD Version'], $gd);
   $gd_version = $gd[0];

   return $gd_version;
}


I really think this is a bug and not a simple suggestion.

Laurent Duretz
Developer for PhpWebGallery
Delete the folder captcha_fonts for a quick fix. Doesn't look quite as pretty but you can see what it says then.
Included this suggestion for 1.4.3