Cacti: Tab images fail to render due to TrueType support in PHP GD module

Created on 24 Jan 2018  路  8Comments  路  Source: Cacti/cacti

Upgrade Cacti form 1.1.30 to 1.1.33 锛宼hold is not work.
thold_develop.zip(1.0.4)
cacti.log
01/24/2018 08:13:08 - ERROR PHP ERROR: Uncaught Error: Call to undefined function imagettfbbox() in /usr/local/nginx/html/cacti/lib/functions.php:4344
01/24/2018 08:13:08 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4520 cacti_debug_backtrace)
01/24/2018 08:13:11 - ERROR PHP ERROR: Uncaught Error: Call to undefined function imagettfbbox() in /usr/local/nginx/html/cacti/lib/functions.php:4344
01/24/2018 08:13:11 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4520 cacti_debug_backtrace)
01/24/2018 08:13:12 - ERROR PHP ERROR: Uncaught Error: Call to undefined function imagettfbbox() in /usr/local/nginx/html/cacti/lib/functions.php:4344
01/24/2018 08:13:12 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4520 cacti_debug_backtrace)
01/24/2018 08:13:13 - ERROR PHP ERROR: Uncaught Error: Call to undefined function imagettfbbox() in /usr/local/nginx/html/cacti/lib/functions.php:4344
01/24/2018 08:13:13 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4520 cacti_debug_backtrace)
01/24/2018 08:13:13 - ERROR PHP ERROR: Uncaught Error: Call to undefined function imagettfbbox() in /usr/local/nginx/html/cacti/lib/functions.php:4344
01/24/2018 08:13:13 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4520 cacti_debug_backtrace)

All 8 comments

https://github.com/Cacti/cacti/issues/1255 I have the same error with (/lib/functions.php: 4520 cacti_debug_backtrace) after upgrade to 1.131

Have you used the latest develop code of the plugins? They don鈥檛 appear to be released on the same cycle as Cacti

I've just checked my live site, I'm not having these errors. More over, thold does not even seem to call (directly) 'imagettfbbox'. So I went and checked the base cacti code, this appears to be a function for using the Classic theme.

The strange part is, this function should be part of your base php installation: http://php.net/manual/en/function.imagettfbbox.php

Although there is a note on the PHP website which says:

Note: This function is only available if PHP is compiled with freetype support (*--with-freetype-dir=DIR *)

So, the question is, do you have freetype support turned on?

I have tested latest cacti with latest thold and i don't have this error.
Fresh install from 1.1.28 and update to 1.1.33 with git.
馃憤

This is a php-gd dependency issue as per the prior post. Though we did have a problem with this in an old bug, but apparently we did not fix it completely.

We can use imagestring() instead of imagettfbbox() when the later is not defined. So, let's keep this open.

I've submitted a PR for this now

Example without spaces:
image

Example with spaces:
image

Thanks for all the good work netniV! Closing.

Was this page helpful?
0 / 5 - 0 ratings