Unable to create graphic text image on Wamp 3.1.7 with PHP 7.1.26 or later
Posted by: KenCRoy1 (67.231.49.---)
Date: April 08, 2019 01:10AM

On my WampServer 3.1.7 64-bit version running on Windows 10 Home (laptop) or on Windows 7 Pro (desktop), I am getting following errors

PHP Warning: imagettftext(): Could not find/open font in D:\wamp64\www\tng\title.php on line 154

when I switch to use PHP 7.2 or 7.3 on WampServer. The code works fine on ICDSoft PHP 7.2.13 site

Best I can tell the difference is the

FreeType Version 2.9.1 on WampServer with PHP 7.1.26 or higher versus 2.7.0 in PHP 5.6

ICDSoft is using FreeType Version 2.6.3 for their PHP 7.2.13 - my dynamic title script works there and on my WampServer with PHH 5.6 but not when I switch to PHP 7.1.26, 7.2.14, or 7.3.1

I have tried all the various solutions recommended when I searched for PHP Warning: imagettftext(): Could not find/open font but none seem to resolve the problem

Anyone know how I can use Free Type Version 2.7 for the other versions of PHP?

Options: ReplyQuote
Re: Unable to create graphic text image on Wamp 3.1.7 with PHP 7.1.26 or later
Posted by: Otomatic (Moderator)
Date: April 08, 2019 09:21AM

Hi,

The different versions of PHP come from the official PHP website, (www.php.net) and are compiled with freetype support.
The different versions of freetype are part of the official PHP distributions and cannot be changed.

It is not PHP that must adapt to your code, but it is your code that must adapt to PHP's evolutions.

[www.php.net]

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.8 32 bit - Apache 2.4.39 - PHP 7.3.4/7.2.17/7.1.28/7.0.33/5.6.40 - MySQL 5.7.25 - MariaDB 10.3.14
Wampserver 3.1.8 64 bit - Apache 2.4.39 - PHP 7.3.4/7.2.17/7.1.28/7.0.33/5.6.40 - MySQL 5.7.25/8.0.15 - MariaDB 10.3.14
PhPMyadmin 4.8.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Unable to create graphic text image on Wamp 3.1.7 with PHP 7.1.26 or later
Posted by: KenCRoy1 (67.231.49.---)
Date: April 08, 2019 11:48AM

Thanks for your reply. I understand that I may need to change my PHP script but it has worked for over 10 years and all the solutions I found when doing a Google search for the PHP error message do NOT provide a solution that works.

I guess I opened the discussion on the wrong forum.

Options: ReplyQuote
Re: Unable to create graphic text image on Wamp 3.1.7 with PHP 7.1.26 or later
Posted by: KenCRoy1 (67.231.49.---)
Date: April 08, 2019 12:08PM

This appears to have been reported as a bug with no satisfactory resolution

[bugs.php.net]

I tried all the work arounds recommended, which might be why my hosting service recompiled with a lower version of freetype

Options: ReplyQuote


Sorry, only registered users may post in this forum.