Topic: [CentOS 7 - php56] Problem with gd and freetype
Hi,
we recently updated a server running CentOS7 (7.8.2003) with php56 (we currenlty cannot upgrade to php7.3 or .4 - the code of our project has to be rewritten).
We're using jpgraph, which relies on the php gd extension to output images. It was running fine until the update.
The update installed (among others) these two packages :
php-gd 5.6.40-20.el7.remi
gd-last 2.3.0-1.el7.remi
When testing, we now encounter the following error :
JpGraph Error: 25092 There is either a configuration problem with TrueType or a problem reading font file "REDACTED/jpgraph/fonts/DejaVuSans.ttf" Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try upgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.
The font file mentionned is well readable by Apache / PHP, and jpgraph was running perfectly fine before the update.
Deducting from the error message, it seems there is a mismatch between freetype and the gd-last package form the repo.
The system's freetype is :
Package freetype-2.8-14.el7.x86_64 already installed and latest version
Any hints or solutions to this pesky bug are welcome !