Getting error in php editor

When attempting to open php editor, I'm getting this error.

Fatal error: Call to undefined function imagecreate() in /var/www/fusionpbx/resources/classes/captcha.php on line 143

ANY help is appreciated
The library shouldn't be missing if you installed Fusion using the recommended installer on a clean install of the recommended operating system. But to answer your question:

Assuming you are running Debian as your OS the standard method would be...
If you are logged in as root just run:
apt-get install php-gd
or, if non root:
sudo apt-get install php-gd

But be aware, I believe that Fusion uses different php source than the standard Debian packages.