Im trying to reproduce a working server with apache2.4 and gmagick (PHP 5.6) on Ubuntu 18.04 server. I've followed the same install as ubuntu 16.04 Both seem the same with slight variations in versions of libraries.
I'm running a test code. Both servers return the graphicsmagick lirary version but on the old server it returns image data and on the new one the var_dump returns null. Tried endless variations without success.
What difference between the servers can cause this? How to find the reason for returning NULL when the getversion works ?
Here is the test code:
$base_image = new Gmagick();
print_r( $base_image->getversion() );
$base_image->newImage(3, 3, "#FFAAFF");
$base_image->setImageFormat('png');
$x = $base_image->getImageBlob();
var_dump($x);
New server info: https://www.awesomescreenshot.com/image/3968945/a12fa60098fd7b69496d335240dc8d5a
old (working) server info: https://www.awesomescreenshot.com/image/3968949/334752e579e3d506d106d64e4fdbf726
Output from old working server: Array ( [versionNumber] => 2103042 [versionString] => GraphicsMagick 1.3.28 2018-01-20 Q16 http://www.GraphicsMagick.org/ ) string(81) "�PNG IHDR����IDAT�c��ժ����"+V�!IEND�B`�"
Output from new Not working server: Array ( [versionNumber] => 2168833 [versionString] => GraphicsMagick 1.4 snapshot-20180922 Q16 http://www.GraphicsMagick.org/ ) NULL