Fixing fatal error for imageftbbox and imagecreatetruecolor

eForm requires PHP GD library installed with Freetype and LibPNG support. For most of the hosts these configurations are common, however in some cases they might be absent.

This will produce some error messages like this.

Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor()

or

PHP Fatal error: Call to undefined function GDText\imageftbbox()

etc. This will also completely break eForm email function and quick preview function.

To fix it, kindly ask your host to install the missing extensions. The PHP manual page has some insights on how to do it.

In most of debian based Linux OS, the following command solves it.

For PHP 7

[bash]sudo apt-get install php7.0-gd[/bash]

For php 7.1

[bash]sudo apt-get install php7.1-gd[/bash]

For PHP 5

[bash]sudo apt-get install php5-gd[/bash]

Also don’t forget to restart your webserver.

If using apache

[bash]sudo service apache2 restart[/bash]

If using nginx

[bash]sudo service nginx restart[/bash]

Swashata has written 257 articles

Hi there, I am the Lead Developer at WPQuark.com. I love to create something beautiful for WordPress and here I write about how to use them. When I am not working, usually I am doing a number of other creative things ;).