I have the following in my code:
use Phalcon\Image\Adapter\GD as Image; ... $imagePath = BASE_DIR . '/public/img/map-icons/' . $client->getId() . '/' . $file; $image = new Image($imagePath); ... $fontFile = $this->getFontPath(); $image->text($text, $x, $y, 1, '#FFFFFF', $fontSize, $fontFile);
Under Phalcon 1.3.4 and php 5.4.45 it works fine, but when I migrated the application to a new server running Phalcon version 3.4.5 and php 7.3.17 the
$image->text($text, $x, $y, 1, '#FFFFFF', $fontSize, $fontFile); is giving the following error:
Project staging.api.my-domain.com raised exception class Phalcon\lmage\Exception with message "Call to imagettfbboxO failed" at gd.zep, line 357
The literal values being passed to
$image->text(..) are as follows:
$image->text(H, 9, 20, 1, '#FFFFFF', 11, '/var/www/vhosts/staging.api.mydomain.com/src/fonts/arialbd.ttf');
I have googled high and low but have found no mention of this error.
What could be causing this?
Can anyone help me?