I got a very weird problem in my PHP environment using Imagick:
My environment is like this:
Darwin 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
PHP 7.0.16 (cli) (built: Feb 16 2017 22:57:49) ( NTS )
imagick module version => 3.4.3RC4
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 6.9.7-6 Q16 x86_64 2017-02-01 http://www.imagemagick.org
Imagick using ImageMagick library version => ImageMagick 6.9.7-7 Q16 x86_64 2017-02-09 http://www.imagemagick.org
And the method setFont of Imagick will cost too long to execute(and even get the default 30 second timeout in execution).
The code is just like this:
<?php
$img = new Imagick();
$img->setFont("./SpicyRice.ttf");
echo "Done";
And the code $img->setFont("./SpicyRice.ttf")
will get stuck.
No error is thrown, PHP just hang at that method, and timeout the default 30 seconds of execution.
Is there anyone have any thoughts about this? This is the font file that I used.