-2

I have This Error:

Fatal error: Call to undefined function imagettfbbox() in /home/example/public_html/generate.php on line 65

Line 65 of generate.php :

63- $code = $this->generateCode();

64- $font = _ROOT_PATH_ . '/Captcha/ccf.ttf';

65- imagettfbbox(138, 0, $font, $code);

Help me plz :(

2 Answers2

2

according to http://php.net/manual/en/function.imagettfbbox.php

 This function requires both the GD library and the ยป FreeType library. 

You must be missing one or both of the required libraries in your PHP build.

build file 'info.php' with this code:

<?php phpinfo() ?>

run it and see which are missing, then go and install it/them.

EmRa228
  • 1,226
  • 13
  • 22
1

To use the function "imagettfbbox" one must have both GD and FreeType. It seems, given the error one of those is missing.

PHP.net imagettfbbox docs

Once they are both available the function should work.

SamA
  • 587
  • 3
  • 6