Breaking News
Home / Web / PHP / PHP Issues / PhpMotion fails to generate Captcha Image

PhpMotion fails to generate Captcha Image

Issue

I just installed PhpMotion v3.5 and when I go to the register page, the image captcha does not display due to which I cannot login.

On futher review of the code and php error log the following error is seen.

Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /var/www/video/includes/captcha.php on line 53
Error in imagettfbbox function

Solution

This is a due to a bug in the captcha.php file where it cannot find the TTF font file for rendering the captcha. This can be fixed by just changing one line in the captcha.php file as below:

Open the captcha.php and change this following line from

var $font = ‘DoradoHeadline.ttf’;
to
var $font = ‘./DoradoHeadline.ttf’;

Try again the captcha should be working. One observation , this issue does not happen on MAC but on Linux/Unix only.[pb_builder]

Check Also

Warning: mysql_connect(): [2002] No such file or directory

Issue Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in …

Advertisment ad adsense adlogger