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()


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

sudo apt-get install php7.0-gd

For php 7.1

sudo apt-get install php7.1-gd

For PHP 5

sudo apt-get install php5-gd

Also don’t forget to restart your webserver.

If using apache

sudo service apache2 restart

If using nginx

sudo service nginx restart

Swashata has written 247 articles

Hi there, I am the Lead Developer at 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 ;).